I |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239378 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 y z - 3 z, 17 x - 6, -2 y z + 5 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [2 y z - 9 y, -15 x - 19 y, 6 x z + 3] > Problem := [F,G]; 2 Problem := [[-12 y z - 3 z, 17 x - 6, -2 y z + 5 x], 2 [2 y z - 9 y, -15 x - 19 y, 6 x z + 3]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.1MB, alloc=32.3MB, time=0.34 memory used=48.0MB, alloc=32.3MB, time=0.55 memory used=68.5MB, alloc=56.3MB, time=0.77 memory used=109.6MB, alloc=60.3MB, time=1.21 memory used=145.7MB, alloc=84.3MB, time=1.63 memory used=197.3MB, alloc=108.3MB, time=2.54 N1 := 1743 > GB := Basis(F, plex(op(vars))); 2 GB := [17 x - 6, 4 y + 1, z + 10 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=271.3MB, alloc=108.3MB, time=3.51 N2 := 823 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-12 y z - 3 z, 17 x - 6, -2 z y + 5 x, 2 y z - 9 y, -15 x - 19 y, 6 x z + 3] > J:=[op(GB),op(G)]; 2 2 J := [17 x - 6, 4 y + 1, z + 10 x, 2 y z - 9 y, -15 x - 19 y, 6 x z + 3] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 1, 2/3, 2/3, 2/3, 1/3, 5/12, 5/12, 6, 10, 10, 2, 2, 1, 1, 2/3, 1/2, 1/2, 1/3, 1/3, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=337.5MB, alloc=108.3MB, time=4.48 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239382 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [13 x y - 17 y , -8 x z - 19 y z, 20 x y + 12 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [11 x + 20 y, 16 x y - 20 y , 3 y - 8 z] > Problem := [F,G]; 2 Problem := [[13 x y - 17 y , -8 x z - 19 y z, 20 x y + 12 z], 2 2 2 [11 x + 20 y, 16 x y - 20 y , 3 y - 8 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.12 memory used=26.0MB, alloc=32.3MB, time=0.30 memory used=48.7MB, alloc=32.3MB, time=0.54 memory used=69.0MB, alloc=56.3MB, time=0.77 N1 := 807 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x y, -13 x y + 17 y , 5 y x + 3 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=110.2MB, alloc=56.3MB, time=1.31 memory used=148.9MB, alloc=84.3MB, time=1.72 N2 := 391 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [13 x y - 17 y , -8 x z - 19 y z, 20 x y + 12 z, 11 x + 20 y, 2 2 16 x y - 20 y , 3 y - 8 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x y, -13 x y + 17 y , 5 y x + 3 z, 11 x + 20 y, 16 x y - 20 y , 2 3 y - 8 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 5/6, 1, 1/2, 5/12, 2/3, 1/3, 6, 13, 13, 3, 2, 2, 1, 5/6, 1, 1/3, 5/12, 2/3, 1/6, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=156.2MB, alloc=84.3MB, time=1.83 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239384 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-5 y - x, -19 x z + 18 z , 11 x - 6 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [2 x z - 16 z, -x z - 13, -2 x + 16 z ] > Problem := [F,G]; 2 2 2 Problem := [[-5 y - x, -19 x z + 18 z , 11 x - 6 x y], 2 2 [2 x z - 16 z, -x z - 13, -2 x + 16 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.14 memory used=26.3MB, alloc=32.3MB, time=0.35 memory used=49.2MB, alloc=32.3MB, time=0.58 N1 := 517 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [605 x + 36 x , -11 x + 6 x y, 5 y + x, -19 x z + 18 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=68.6MB, alloc=56.3MB, time=0.83 memory used=110.6MB, alloc=60.3MB, time=1.25 N2 := 517 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-5 y - x, -19 x z + 18 z , 11 x - 6 x y, 2 x z - 16 z, -x z - 13, 2 2 -2 x + 16 z ] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [605 x + 36 x , -11 x + 6 x y, 5 y + x, -19 x z + 18 z , 2 x z - 16 z, 2 2 -x z - 13, -2 x + 16 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1, 1/3, 2/3, 7/12, 1/6, 1/2, 7, 13, 15, 3, 3, 2, 2, 1, 2/7, 4/7, 9/14, 1/7, 3/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=127.3MB, alloc=60.3MB, time=1.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239386 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [8 x y + 5 y, 3 z + 16, -7 x + 19 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [15 z + 9 x, 18 z - 7 y, z + 11 x] > Problem := [F,G]; 2 2 2 Problem := [[8 x y + 5 y, 3 z + 16, -7 x + 19 y ], 2 2 2 [15 z + 9 x, 18 z - 7 y, z + 11 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.13 memory used=26.5MB, alloc=32.3MB, time=0.32 memory used=50.0MB, alloc=32.3MB, time=0.56 memory used=72.0MB, alloc=56.3MB, time=0.88 memory used=113.6MB, alloc=60.3MB, time=1.46 N1 := 879 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [8 x + 5 x , 8 x y + 5 y, -7 x + 19 y , 3 z + 16] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=148.3MB, alloc=60.3MB, time=2.04 memory used=187.4MB, alloc=84.3MB, time=2.47 memory used=250.2MB, alloc=108.3MB, time=3.27 N2 := 879 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 2 8 x y + 5 y, 3 z + 16, -7 x + 19 y , 15 z + 9 x, 18 z - 7 y, z + 11 x] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [8 x + 5 x , 8 x y + 5 y, -7 x + 19 y , 3 z + 16, 15 z + 9 x, 2 2 18 z - 7 y, z + 11 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 1/2, 2/3, 1/3, 1/3, 1/3, 7, 12, 15, 3, 3, 2, 2, 5/7, 3/7, 4/7, 3/7, 2/7, 2/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=263.6MB, alloc=108.3MB, time=3.48 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239389 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [12 x z - 6 y , -5 z - z, 15 x y + 14 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-7 x z + 13, 4 z + 8 y, x - x] > Problem := [F,G]; 2 2 Problem := [[12 x z - 6 y , -5 z - z, 15 x y + 14 z], 2 2 [-7 x z + 13, 4 z + 8 y, x - x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.12 memory used=26.2MB, alloc=32.3MB, time=0.33 memory used=47.4MB, alloc=32.3MB, time=0.64 memory used=66.8MB, alloc=32.3MB, time=0.87 memory used=85.3MB, alloc=56.3MB, time=1.13 memory used=124.3MB, alloc=60.3MB, time=1.49 memory used=160.7MB, alloc=84.3MB, time=1.82 memory used=216.8MB, alloc=84.3MB, time=2.35 memory used=270.4MB, alloc=108.3MB, time=2.93 memory used=345.7MB, alloc=140.3MB, time=3.75 memory used=438.5MB, alloc=164.3MB, time=4.82 memory used=545.2MB, alloc=188.3MB, time=6.23 memory used=663.7MB, alloc=212.3MB, time=7.64 memory used=775.6MB, alloc=492.3MB, time=9.23 memory used=933.8MB, alloc=516.3MB, time=11.36 memory used=1097.4MB, alloc=540.3MB, time=13.19 memory used=1264.6MB, alloc=564.3MB, time=15.25 memory used=1428.6MB, alloc=588.3MB, time=18.93 memory used=1593.3MB, alloc=612.3MB, time=22.72 memory used=1768.2MB, alloc=636.3MB, time=26.76 memory used=1955.9MB, alloc=660.3MB, time=31.27 memory used=2157.1MB, alloc=684.3MB, time=36.40 memory used=2371.7MB, alloc=708.3MB, time=41.89 memory used=2599.3MB, alloc=732.3MB, time=48.13 memory used=2850.9MB, alloc=756.3MB, time=54.92 memory used=3126.4MB, alloc=780.3MB, time=62.36 memory used=3425.9MB, alloc=804.3MB, time=70.33 memory used=3749.3MB, alloc=828.3MB, time=79.45 memory used=4096.6MB, alloc=828.3MB, time=90.64 memory used=4443.9MB, alloc=852.3MB, time=102.92 memory used=4815.2MB, alloc=852.3MB, time=115.79 memory used=5186.4MB, alloc=852.3MB, time=129.82 memory used=5557.6MB, alloc=852.3MB, time=145.46 memory used=5928.7MB, alloc=876.3MB, time=160.92 memory used=6323.8MB, alloc=876.3MB, time=177.29 memory used=6718.8MB, alloc=876.3MB, time=194.10 memory used=7113.9MB, alloc=900.3MB, time=210.98 memory used=7532.8MB, alloc=900.3MB, time=228.65 memory used=7951.7MB, alloc=900.3MB, time=246.33 memory used=8370.4MB, alloc=924.3MB, time=264.03 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239690 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [14 y z + 19 x, 13 x - 7 x y, 20 x + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-20 y - 13 z, 9 y + 7 x, 12 x z - z] > Problem := [F,G]; 2 2 Problem := [[14 y z + 19 x, 13 x - 7 x y, 20 x + 19 y], 2 2 [-20 y - 13 z, 9 y + 7 x, 12 x z - z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.6MB, alloc=32.3MB, time=0.81 memory used=69.4MB, alloc=56.3MB, time=1.22 memory used=111.1MB, alloc=60.3MB, time=1.96 memory used=147.8MB, alloc=84.3MB, time=2.79 N1 := 1305 > GB := Basis(F, plex(op(vars))); 2 GB := [140 x + 247 x, 7 y - 13 x, 26 x z + 19 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=200.2MB, alloc=84.3MB, time=4.55 memory used=256.9MB, alloc=108.3MB, time=5.52 N2 := 1023 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [14 z y + 19 x, 13 x - 7 x y, 20 x + 19 y, -20 y - 13 z, 9 y + 7 x, 12 x z - z] > J:=[op(GB),op(G)]; 2 2 2 J := [140 x + 247 x, 7 y - 13 x, 26 x z + 19 x, -20 y - 13 z, 9 y + 7 x, 12 x z - z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 1, 5/6, 5/6, 1/2, 1/2, 5/12, 1/3, 6, 11, 11, 2, 2, 2, 1, 5/6, 1/2, 1/2, 7/12, 1/4, 1/3, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=311.7MB, alloc=108.3MB, time=7.11 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239701 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-6 x - 15 y , -2 x y + 7 x z, 19 x y - 6 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [6 x y - 16 z , -8 + 15 y, -5 x + 2 y ] > Problem := [F,G]; 2 2 Problem := [[-6 x - 15 y , -2 x y + 7 x z, 19 x y - 6 z], 2 2 2 [6 x y - 16 z , -8 + 15 y, -5 x + 2 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.8MB, alloc=32.3MB, time=0.80 memory used=68.8MB, alloc=56.3MB, time=1.16 memory used=113.0MB, alloc=60.3MB, time=1.94 memory used=153.2MB, alloc=84.3MB, time=2.65 memory used=210.2MB, alloc=108.3MB, time=4.36 N1 := 1523 > GB := Basis(F, plex(op(vars))); 4 3 2 2 2 GB := [133 x - 12 x , 133 x y - 12 x y, 5 y + 2 x , -19 x y + 6 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=284.6MB, alloc=108.3MB, time=6.32 N2 := 739 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-6 x - 15 y , -2 x y + 7 x z, 19 y x - 6 z, 6 x y - 16 z , 15 y - 8, 2 2 -5 x + 2 y ] > J:=[op(GB),op(G)]; 4 3 2 2 2 J := [133 x - 12 x , 133 x y - 12 x y, 5 y + 2 x , -19 x y + 6 z, 2 2 2 6 x y - 16 z , 15 y - 8, -5 x + 2 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 2, 2, 5/6, 1, 1/2, 1/2, 1/2, 1/4, 7, 14, 16, 4, 4, 2, 2, 6/7, 6/7, 2/7, 4/7, 1/2, 1/7, 0, -5, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=364.2MB, alloc=116.3MB, time=8.01 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239713 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [11 x + 4 z, -2 x y + 11 x, -11 x y + 11 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [9 x y - 15, -18 y z - 13 x, -16 x y + 4 z] > Problem := [F,G]; 2 Problem := [[11 x + 4 z, -2 x y + 11 x, -11 x y + 11 z ], [9 x y - 15, -18 y z - 13 x, -16 x y + 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=68.4MB, alloc=32.3MB, time=1.11 memory used=87.7MB, alloc=56.3MB, time=1.41 memory used=125.3MB, alloc=60.3MB, time=1.99 memory used=161.2MB, alloc=84.3MB, time=2.59 memory used=219.3MB, alloc=108.3MB, time=3.64 memory used=296.3MB, alloc=140.3MB, time=5.04 memory used=390.7MB, alloc=164.3MB, time=6.72 memory used=499.0MB, alloc=188.3MB, time=8.83 memory used=612.8MB, alloc=212.3MB, time=12.19 memory used=734.8MB, alloc=236.3MB, time=16.66 memory used=873.7MB, alloc=260.3MB, time=22.19 memory used=1036.5MB, alloc=260.3MB, time=28.68 memory used=1199.4MB, alloc=284.3MB, time=35.21 memory used=1386.4MB, alloc=284.3MB, time=42.63 N1 := 5501 > GB := Basis(F, plex(op(vars))); 2 GB := [11 x - 8 x, 2 x y - 11 x, 4 z + 11 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 683 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [4 z + 11 x, -2 x y + 11 x, -11 x y + 11 z , 9 x y - 15, -18 y z - 13 x, -16 x y + 4 z] > J:=[op(GB),op(G)]; 2 J := [11 x - 8 x, 2 x y - 11 x, 4 z + 11 x, 9 x y - 15, -18 y z - 13 x, -16 x y + 4 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 11, 2, 1, 1, 2, 1, 5/6, 2/3, 7/12, 5/12, 1/3, 6, 13, 11, 2, 2, 1, 1, 1, 2/3, 1/2, 2/3, 1/3, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1570.1MB, alloc=284.3MB, time=47.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239776 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-8 x y + 7 x, -20 x y - 7 z , -11 z - 9] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [2 x y + 6 y, -15 y + 10 x, 16 x y] > Problem := [F,G]; 2 2 Problem := [[-8 x y + 7 x, -20 x y - 7 z , -11 z - 9], 2 [2 x y + 6 y, -15 y + 10 x, 16 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 N1 := 247 > GB := Basis(F, plex(op(vars))); 2 GB := [55 x - 18, 8 y - 7, 11 z + 9] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=57.3MB, alloc=68.3MB, time=1.13 N2 := 63 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-8 x y + 7 x, -20 x y - 7 z , -11 z - 9, 2 x y + 6 y, -15 y + 10 x, 16 y x] > J:=[op(GB),op(G)]; 2 2 J := [55 x - 18, 8 y - 7, 11 z + 9, 2 x y + 6 y, -15 y + 10 x, 16 y x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 5/6, 5/6, 1/3, 6/13, 6/13, 2/13, 6, 9, 10, 2, 1, 2, 2, 2/3, 2/3, 1/6, 4/13, 5/13, 1/13, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=69.4MB, alloc=68.3MB, time=1.33 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239778 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-x y - 12 x z, 9 x - 11 y, -19 x + 9] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-8 x + 7 y z, 13 x y - 13 x z, 9 x - 5 y z] > Problem := [F,G]; 2 2 Problem := [[-x y - 12 x z, 9 x - 11 y, -19 x + 9], 2 2 [-8 x + 7 y z, 13 x y - 13 x z, 9 x - 5 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=69.6MB, alloc=56.3MB, time=1.22 memory used=111.6MB, alloc=60.3MB, time=1.96 memory used=149.0MB, alloc=84.3MB, time=2.73 memory used=201.4MB, alloc=108.3MB, time=4.55 N1 := 1387 > GB := Basis(F, plex(op(vars))); 2 GB := [19 x - 9, 209 y - 81, 836 z + 27] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=273.9MB, alloc=116.3MB, time=5.75 memory used=354.0MB, alloc=140.3MB, time=7.22 memory used=450.3MB, alloc=164.3MB, time=8.91 memory used=558.8MB, alloc=188.3MB, time=11.52 memory used=670.2MB, alloc=212.3MB, time=15.34 memory used=795.1MB, alloc=236.3MB, time=20.23 memory used=943.9MB, alloc=236.3MB, time=25.99 memory used=1092.8MB, alloc=260.3MB, time=31.77 N2 := 4355 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-x y - 12 x z, 9 x - 11 y, -19 x + 9, -8 x + 7 y z, 13 x y - 13 x z, 2 -5 z y + 9 x ] > J:=[op(GB),op(G)]; 2 2 J := [19 x - 9, 209 y - 81, 836 z + 27, -8 x + 7 y z, 13 x y - 13 x z, 2 -5 z y + 9 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 1, 1, 1, 5/6, 2/3, 2/3, 5/12, 1/3, 6, 12, 10, 2, 2, 1, 1, 2/3, 2/3, 2/3, 5/12, 1/3, 1/3, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1145.0MB, alloc=260.3MB, time=33.62 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239823 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [11 x - 18, -19 x + 19 z , 2 x + 14 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-10 x z + 17, -3 y - 18 z , -17 x - 9 x z] > Problem := [F,G]; 2 2 2 2 Problem := [[11 x - 18, -19 x + 19 z , 2 x + 14 z], 2 2 2 [-10 x z + 17, -3 y - 18 z , -17 x - 9 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.50 memory used=46.8MB, alloc=32.3MB, time=0.81 memory used=66.5MB, alloc=56.3MB, time=1.16 memory used=107.8MB, alloc=56.3MB, time=1.89 memory used=144.2MB, alloc=56.3MB, time=2.86 N1 := 883 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 111 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [11 x - 18, -19 x + 19 z , 2 x + 14 z, -10 x z + 17, -3 y - 18 z , 2 -17 x - 9 x z] > J:=[op(GB),op(G)]; 2 2 2 J := [1, -10 x z + 17, -3 y - 18 z , -17 x - 9 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 5/6, 1/6, 5/6, 1/2, 1/12, 5/12, 4, 6, 6, 2, 2, 2, 2, 1/2, 1/4, 3/4, 3/7, 1/7, 3/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=162.5MB, alloc=56.3MB, time=3.16 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239827 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [5 y - 13, 11 x y - 4 y z, -5 z - 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-17 x - 15 y, -2 z - 18 y, 10 y z + 2 y] > Problem := [F,G]; 2 2 Problem := [[5 y - 13, 11 x y - 4 y z, -5 z - 16 x], 2 [-17 x - 15 y, -2 z - 18 y, 10 y z + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=32.3MB, time=0.80 memory used=67.8MB, alloc=56.3MB, time=1.12 memory used=112.7MB, alloc=60.3MB, time=1.92 memory used=151.5MB, alloc=84.3MB, time=2.64 memory used=208.4MB, alloc=84.3MB, time=3.70 memory used=257.4MB, alloc=108.3MB, time=4.80 memory used=320.3MB, alloc=132.3MB, time=6.68 memory used=398.7MB, alloc=132.3MB, time=9.61 memory used=477.1MB, alloc=156.3MB, time=12.57 memory used=579.5MB, alloc=156.3MB, time=16.39 N1 := 3305 > GB := Basis(F, plex(op(vars))); 2 2 GB := [605 x + 256 x, 5 y - 13, -11 x + 4 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=647.8MB, alloc=156.3MB, time=17.98 memory used=769.2MB, alloc=188.3MB, time=20.60 N2 := 1815 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [5 y - 13, 11 x y - 4 y z, -5 z - 16 x, -17 x - 15 y, -2 z - 18 y, 10 y z + 2 y] > J:=[op(GB),op(G)]; 2 2 2 J := [605 x + 256 x, 5 y - 13, -11 x + 4 z, -17 x - 15 y, -2 z - 18 y, 10 y z + 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 1/2, 5/6, 2/3, 1/4, 7/12, 1/3, 6, 10, 10, 2, 2, 2, 2, 1/2, 2/3, 1/2, 1/3, 5/12, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=857.4MB, alloc=188.3MB, time=23.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239858 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-13 x z + 13 y z, 3 x - 19 x y, 14 z + 12] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-19 x y - 18, -13 y z + 13 z , 17 x + 14 x] > Problem := [F,G]; 2 2 Problem := [[-13 x z + 13 y z, 3 x - 19 x y, 14 z + 12], 2 2 [-19 x y - 18, -13 y z + 13 z , 17 x + 14 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.84 N1 := 185 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , y - x, 7 z + 6] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=66.0MB, alloc=32.3MB, time=1.13 N2 := 145 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-13 x z + 13 y z, 3 x - 19 x y, 14 z + 12, -19 x y - 18, 2 2 -13 y z + 13 z , 17 x + 14 x] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x , y - x, 7 z + 6, -19 x y - 18, -13 y z + 13 z , 17 x + 14 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 2/3, 2/3, 1/2, 1/2, 1/3, 5/12, 6, 9, 11, 2, 2, 1, 2, 2/3, 1/2, 1/3, 5/12, 1/4, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=81.0MB, alloc=32.3MB, time=1.38 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239859 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-17 z + 15 z, -13 x z + 11 z, -19 x y + 14 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-16 x y - 13 y , 5 x z + 5 y, -15 x z - 18 z ] > Problem := [F,G]; 2 Problem := [[-17 z + 15 z, -13 x z + 11 z, -19 x y + 14 y], 2 2 [-16 x y - 13 y , 5 x z + 5 y, -15 x z - 18 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=48.8MB, alloc=32.3MB, time=0.88 memory used=68.1MB, alloc=56.3MB, time=1.24 N1 := 717 > GB := Basis(F, plex(op(vars))); 2 GB := [19 x y - 14 y, 13 x z - 11 z, y z, 17 z - 15 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.4MB, alloc=56.3MB, time=2.05 memory used=146.5MB, alloc=84.3MB, time=2.77 N2 := 717 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-17 z + 15 z, -13 x z + 11 z, -19 x y + 14 y, -16 x y - 13 y , 2 5 x z + 5 y, -15 x z - 18 z ] > J:=[op(GB),op(G)]; 2 2 J := [19 x y - 14 y, 13 x z - 11 z, y z, 17 z - 15 z, -16 x y - 13 y , 2 5 x z + 5 y, -15 x z - 18 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 5/6, 1/2, 2/3, 5/12, 5/12, 7/12, 7, 14, 14, 2, 1, 2, 2, 5/7, 4/7, 5/7, 5/14, 3/7, 4/7, -2, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=169.5MB, alloc=84.3MB, time=3.36 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428239864 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-14 y z - 16, -2 z + 15 z, 11 x y - 3 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [7 x z + 20 z , -18 z - 18 y, -17 y - 12 z] > Problem := [F,G]; 2 Problem := [[-14 y z - 16, -2 z + 15 z, 11 x y - 3 z], 2 2 [7 x z + 20 z , -18 z - 18 y, -17 y - 12 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=46.9MB, alloc=32.3MB, time=0.79 memory used=65.9MB, alloc=56.3MB, time=1.09 memory used=104.5MB, alloc=60.3MB, time=1.68 memory used=140.2MB, alloc=60.3MB, time=2.22 memory used=174.2MB, alloc=84.3MB, time=2.76 memory used=229.1MB, alloc=84.3MB, time=3.58 memory used=281.0MB, alloc=116.3MB, time=4.42 memory used=353.5MB, alloc=116.3MB, time=5.56 memory used=422.9MB, alloc=140.3MB, time=6.69 memory used=511.2MB, alloc=164.3MB, time=8.17 memory used=617.4MB, alloc=164.3MB, time=9.94 memory used=719.5MB, alloc=188.3MB, time=11.71 memory used=820.5MB, alloc=468.3MB, time=13.64 memory used=953.3MB, alloc=492.3MB, time=16.14 memory used=1095.1MB, alloc=516.3MB, time=18.83 memory used=1244.7MB, alloc=540.3MB, time=21.75 memory used=1401.5MB, alloc=564.3MB, time=24.80 memory used=1564.0MB, alloc=588.3MB, time=28.03 memory used=1732.5MB, alloc=612.3MB, time=31.42 memory used=1907.8MB, alloc=636.3MB, time=34.97 memory used=2093.3MB, alloc=660.3MB, time=38.67 memory used=2280.9MB, alloc=684.3MB, time=42.51 memory used=2468.5MB, alloc=708.3MB, time=46.49 memory used=2660.6MB, alloc=732.3MB, time=50.56 memory used=2845.0MB, alloc=756.3MB, time=55.84 memory used=3018.4MB, alloc=780.3MB, time=62.03 memory used=3199.4MB, alloc=804.3MB, time=68.89 memory used=3391.7MB, alloc=828.3MB, time=76.76 memory used=3596.5MB, alloc=852.3MB, time=85.15 memory used=3814.3MB, alloc=876.3MB, time=94.32 memory used=4045.6MB, alloc=900.3MB, time=104.10 memory used=4291.0MB, alloc=924.3MB, time=114.72 memory used=4551.0MB, alloc=948.3MB, time=126.02 memory used=4825.5MB, alloc=972.3MB, time=138.16 memory used=5114.7MB, alloc=996.3MB, time=150.91 memory used=5418.2MB, alloc=1020.3MB, time=164.15 memory used=5737.0MB, alloc=1044.3MB, time=178.13 memory used=6071.1MB, alloc=1068.3MB, time=192.83 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240164 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-12 x y - x, -8 z , -14 z + 2 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [15 x + 7 x, 17 x y + 14 z , 18 z + 18 x] > Problem := [F,G]; 2 2 Problem := [[-12 x y - x, -8 z , -14 z + 2 x], 2 2 2 [15 x + 7 x, 17 x y + 14 z , 18 z + 18 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.20 memory used=27.5MB, alloc=32.3MB, time=0.59 N1 := 301 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.5MB, alloc=32.3MB, time=0.98 N2 := 151 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 -12 x y - x, -8 z , -14 z + 2 x, 15 x + 7 x, 14 z + 17 y x, 18 z + 18 x ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x, z , 15 x + 7 x, 14 z + 17 y x, 18 z + 18 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 5/6, 1/3, 2/3, 7/12, 1/6, 1/3, 5, 8, 9, 2, 2, 1, 2, 4/5, 1/5, 3/5, 5/9, 1/9, 1/3, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=57.0MB, alloc=32.3MB, time=1.13 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240166 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-19 x z + 16 y, 14 y - 12, 2 + 7 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [8 y - 6 z, x y + 15 x z, 12 y - 16 y z] > Problem := [F,G]; 2 Problem := [[-19 x z + 16 y, 14 y - 12, 2 + 7 z], 2 2 [8 y - 6 z, x y + 15 x z, 12 y - 16 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.2MB, alloc=32.3MB, time=0.78 memory used=66.9MB, alloc=32.3MB, time=1.07 memory used=86.9MB, alloc=56.3MB, time=1.44 memory used=127.7MB, alloc=60.3MB, time=2.18 memory used=164.0MB, alloc=84.3MB, time=2.84 memory used=219.7MB, alloc=108.3MB, time=3.84 memory used=290.3MB, alloc=132.3MB, time=5.63 memory used=370.7MB, alloc=132.3MB, time=8.63 memory used=449.0MB, alloc=156.3MB, time=11.74 memory used=551.3MB, alloc=156.3MB, time=15.75 N1 := 3249 > GB := Basis(F, plex(op(vars))); 2 GB := [361 x - 2688, 56 y + 19 x, 7 z + 2] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=627.8MB, alloc=156.3MB, time=17.66 memory used=749.4MB, alloc=188.3MB, time=20.38 N2 := 1485 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-19 x z + 16 y, 14 y - 12, 7 z + 2, 8 y - 6 z, x y + 15 x z, 2 12 y - 16 y z] > J:=[op(GB),op(G)]; 2 2 J := [361 x - 2688, 56 y + 19 x, 7 z + 2, 8 y - 6 z, x y + 15 x z, 2 12 y - 16 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 1, 1/3, 5/6, 5/6, 1/4, 1/2, 5/12, 6, 11, 10, 2, 2, 2, 1, 1/2, 2/3, 2/3, 1/3, 5/12, 1/3, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=795.0MB, alloc=188.3MB, time=22.08 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240229 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [13 x + 16 z , 18 x y - 17, 11 y + 14 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-y z - 1, -19 x y - 5 z , 14 y z + 7] > Problem := [F,G]; 2 2 2 Problem := [[13 x + 16 z , 18 x y - 17, 11 y + 14 x], 2 [-y z - 1, -19 x y - 5 z , 14 y z + 7]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.8MB, alloc=32.3MB, time=0.51 memory used=48.4MB, alloc=32.3MB, time=0.84 memory used=69.1MB, alloc=32.3MB, time=1.16 memory used=89.1MB, alloc=56.3MB, time=1.48 memory used=130.1MB, alloc=60.3MB, time=2.12 memory used=169.4MB, alloc=60.3MB, time=2.71 memory used=207.9MB, alloc=84.3MB, time=3.37 memory used=267.3MB, alloc=92.3MB, time=4.53 memory used=321.2MB, alloc=116.3MB, time=5.63 memory used=388.6MB, alloc=140.3MB, time=8.12 N1 := 1491 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [4536 x + 3179, 252 x + 187 y, 16 z + 13 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=477.8MB, alloc=140.3MB, time=9.66 memory used=578.9MB, alloc=140.3MB, time=11.42 N2 := 701 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [16 z + 13 x , 18 y x - 17, 11 y + 14 x, -y z - 1, -19 x y - 5 z , 14 y z + 7] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [4536 x + 3179, 252 x + 187 y, 16 z + 13 x , -y z - 1, -19 x y - 5 z , 14 y z + 7] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 2/3, 5/6, 2/3, 1/3, 5/12, 1/3, 6, 12, 13, 3, 3, 1, 2, 2/3, 2/3, 2/3, 1/3, 1/3, 1/3, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=608.8MB, alloc=140.3MB, time=12.23 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240263 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-14 x z - 4 y, -19 x - 4, 4 y z - 11] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-4 x - 4 x y, 3 x z - 5 y, 5 y - 4 z] > Problem := [F,G]; 2 Problem := [[-14 x z - 4 y, -19 x - 4, 4 y z - 11], 2 [-4 x - 4 x y, 3 x z - 5 y, 5 y - 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.52 memory used=47.9MB, alloc=32.3MB, time=0.87 memory used=68.6MB, alloc=56.3MB, time=1.25 memory used=110.2MB, alloc=60.3MB, time=2.01 memory used=147.9MB, alloc=84.3MB, time=2.88 N1 := 1303 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x + 4, 8 y + 77 x, -19 x y + 14 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=201.6MB, alloc=84.3MB, time=4.72 N2 := 471 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-14 x z - 4 y, -19 x - 4, 4 z y - 11, -4 x - 4 x y, 3 z x - 5 y, -4 z + 5 y] > J:=[op(GB),op(G)]; 2 2 2 J := [19 x + 4, 8 y + 77 x, -19 x y + 14 z, -4 x - 4 x y, 3 z x - 5 y, -4 z + 5 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 1, 2/3, 5/6, 2/3, 5/12, 5/12, 1/3, 6, 13, 11, 2, 2, 2, 1, 5/6, 5/6, 1/2, 1/2, 5/12, 1/4, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=255.8MB, alloc=84.3MB, time=5.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240281 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [3 x y - 13 z , 7 x z + 9 y z, -9 y z - 20] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-4 x - 14 y, -19 y - 11, -4 z - 6] > Problem := [F,G]; 2 Problem := [[3 x y - 13 z , 7 x z + 9 y z, -9 y z - 20], 2 2 [-4 x - 14 y, -19 y - 11, -4 z - 6]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.51 memory used=47.5MB, alloc=32.3MB, time=0.83 memory used=68.2MB, alloc=32.3MB, time=1.14 memory used=87.9MB, alloc=32.3MB, time=1.48 memory used=106.7MB, alloc=56.3MB, time=1.79 memory used=148.8MB, alloc=60.3MB, time=2.62 N1 := 603 > GB := Basis(F, plex(op(vars))); 4 3 GB := [343 x + 15600, 9 y + 7 x, 49 x + 780 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=185.5MB, alloc=60.3MB, time=3.53 N2 := 39 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-13 z + 3 y x, 7 x z + 9 y z, -9 y z - 20, -4 x - 14 y, -19 y - 11, 2 -4 z - 6] > J:=[op(GB),op(G)]; 4 3 2 J := [343 x + 15600, 9 y + 7 x, 49 x + 780 z, -4 x - 14 y, -19 y - 11, 2 -4 z - 6] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 1/2, 5/6, 2/3, 1/4, 5/12, 5/12, 6, 9, 13, 4, 4, 2, 2, 2/3, 1/2, 1/3, 1/3, 1/4, 1/6, 3, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=192.9MB, alloc=60.3MB, time=3.66 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240293 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 y z - 1, -13 x + 3, 19 y + 6 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-4 + 14 z, 12 z + 17 x, 8 z + 15 z] > Problem := [F,G]; 2 2 Problem := [[-3 y z - 1, -13 x + 3, 19 y + 6 y], 2 2 [-4 + 14 z, 12 z + 17 x, 8 z + 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=48.4MB, alloc=32.3MB, time=0.91 memory used=68.8MB, alloc=56.3MB, time=1.31 memory used=108.6MB, alloc=80.3MB, time=2.08 memory used=164.6MB, alloc=80.3MB, time=3.92 N1 := 1613 > GB := Basis(F, plex(op(vars))); 2 GB := [13 x - 3, 19 y + 6, 18 z - 19] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=217.4MB, alloc=80.3MB, time=5.52 N2 := 441 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 2 [-3 y z - 1, -13 x + 3, 19 y + 6 y, -4 + 14 z, 12 z + 17 x, 8 z + 15 z] > J:=[op(GB),op(G)]; 2 2 2 J := [13 x - 3, 19 y + 6, 18 z - 19, -4 + 14 z, 12 z + 17 x, 8 z + 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 11, 2, 2, 2, 2, 1/3, 1/3, 2/3, 1/6, 1/4, 5/12, 6, 7, 9, 2, 2, 1, 2, 1/3, 1/6, 2/3, 1/6, 1/12, 5/12, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=242.4MB, alloc=80.3MB, time=6.01 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240314 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [6 y z - 11 z , 13 y z - 17, x + 19 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-6 x + 16 y z, -15 x + 19 z , x y - 18 y ] > Problem := [F,G]; 2 2 Problem := [[6 y z - 11 z , 13 y z - 17, x + 19 x z], 2 2 2 2 [-6 x + 16 y z, -15 x + 19 z , x y - 18 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.7MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=67.5MB, alloc=32.3MB, time=1.10 memory used=87.0MB, alloc=56.3MB, time=1.42 memory used=127.7MB, alloc=60.3MB, time=2.04 memory used=165.3MB, alloc=84.3MB, time=2.63 memory used=217.8MB, alloc=108.3MB, time=3.52 memory used=298.4MB, alloc=140.3MB, time=5.10 memory used=393.0MB, alloc=164.3MB, time=6.94 memory used=502.6MB, alloc=188.3MB, time=9.00 memory used=626.0MB, alloc=468.3MB, time=11.40 memory used=761.5MB, alloc=492.3MB, time=14.03 memory used=907.3MB, alloc=516.3MB, time=16.89 memory used=1063.8MB, alloc=540.3MB, time=19.92 memory used=1226.5MB, alloc=564.3MB, time=23.08 memory used=1383.3MB, alloc=588.3MB, time=27.90 memory used=1542.4MB, alloc=612.3MB, time=33.37 memory used=1711.2MB, alloc=636.3MB, time=39.56 memory used=1892.9MB, alloc=660.3MB, time=46.56 memory used=2088.3MB, alloc=684.3MB, time=54.31 memory used=2297.7MB, alloc=708.3MB, time=62.65 memory used=2519.3MB, alloc=732.3MB, time=72.16 memory used=2757.7MB, alloc=756.3MB, time=82.80 memory used=3020.0MB, alloc=780.3MB, time=94.62 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240614 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-8 x - 3 x z, -7 x + 4 x y, 20 - 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-8 z - 9 x, -4 x y + 10 x, -19 x y - 16 y z] > Problem := [F,G]; 2 2 Problem := [[-8 x - 3 x z, -7 x + 4 x y, 20 - 5 y], 2 [-8 z - 9 x, -4 x y + 10 x, -19 x y - 16 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=48.8MB, alloc=32.3MB, time=0.90 memory used=67.9MB, alloc=56.3MB, time=1.31 N1 := 595 > GB := Basis(F, plex(op(vars))); 2 GB := [7 x - 16 x, y - 4, 21 x z + 128 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=105.9MB, alloc=56.3MB, time=2.03 N2 := 483 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-8 x - 3 x z, -7 x + 4 x y, 20 - 5 y, -8 z - 9 x, -4 x y + 10 x, -19 x y - 16 y z] > J:=[op(GB),op(G)]; 2 2 J := [7 x - 16 x, y - 4, 21 x z + 128 x, -8 z - 9 x, -4 x y + 10 x, -19 x y - 16 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 2, 5/6, 2/3, 1/2, 2/3, 5/12, 1/4, 6, 11, 11, 2, 2, 1, 2, 5/6, 1/2, 1/2, 2/3, 1/3, 1/4, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=134.7MB, alloc=56.3MB, time=2.66 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240622 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 x + 4 z, 7 y + 4 z, 8 x - 7 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [x z - 20 z, -3 x y + 11 z, -19 x y - 8 y] > Problem := [F,G]; 2 Problem := [[-7 x + 4 z, 7 y + 4 z, 8 x - 7 z], [x z - 20 z, -3 x y + 11 z, -19 x y - 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=25.9MB, alloc=32.3MB, time=0.49 memory used=47.8MB, alloc=32.3MB, time=0.87 memory used=68.4MB, alloc=56.3MB, time=1.26 memory used=109.4MB, alloc=84.3MB, time=2.34 N1 := 997 > GB := Basis(F, plex(op(vars))); 2 GB := [49 x - 32 x, 49 y + 32 x, 7 z - 8 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=166.8MB, alloc=84.3MB, time=3.51 N2 := 445 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-7 x + 4 z, 4 z + 7 y, -7 z + 8 x, x z - 20 z, -3 x y + 11 z, -19 x y - 8 y] > J:=[op(GB),op(G)]; 2 J := [49 x - 32 x, 49 y + 32 x, 7 z - 8 x, x z - 20 z, -3 x y + 11 z, -19 x y - 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 10, 2, 2, 1, 1, 5/6, 1/2, 5/6, 5/12, 1/3, 1/2, 6, 12, 10, 2, 2, 1, 1, 1, 1/2, 1/2, 7/12, 1/3, 1/3, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=178.2MB, alloc=84.3MB, time=3.79 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240634 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [x z - 7, -11 x y + 2 y, 2 y z - 17 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-14 x z + 11, -13 x y - 13 z , -3 y + 6 y z] > Problem := [F,G]; Problem := [[x z - 7, -11 x y + 2 y, 2 y z - 17 x], 2 2 [-14 x z + 11, -13 x y - 13 z , -3 y + 6 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.51 memory used=47.7MB, alloc=32.3MB, time=0.83 memory used=67.5MB, alloc=56.3MB, time=1.15 memory used=108.6MB, alloc=60.3MB, time=1.79 memory used=147.1MB, alloc=60.3MB, time=2.39 memory used=183.6MB, alloc=84.3MB, time=2.99 memory used=239.5MB, alloc=84.3MB, time=3.91 memory used=293.3MB, alloc=108.3MB, time=4.79 memory used=368.9MB, alloc=140.3MB, time=6.24 memory used=460.2MB, alloc=164.3MB, time=7.93 memory used=567.2MB, alloc=188.3MB, time=9.89 memory used=687.4MB, alloc=212.3MB, time=12.12 memory used=796.2MB, alloc=492.3MB, time=14.18 memory used=941.6MB, alloc=516.3MB, time=18.34 memory used=1088.2MB, alloc=540.3MB, time=23.36 memory used=1245.2MB, alloc=564.3MB, time=29.44 memory used=1417.1MB, alloc=588.3MB, time=36.64 memory used=1613.0MB, alloc=612.3MB, time=44.83 memory used=1832.8MB, alloc=612.3MB, time=54.03 memory used=2052.6MB, alloc=636.3MB, time=63.23 memory used=2296.3MB, alloc=636.3MB, time=73.46 memory used=2540.0MB, alloc=636.3MB, time=83.59 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240934 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [16 x y - 20 y , -9 z + 8, 15] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [11 x + 15 x y, 3 x - 17 x, -2 y - 6 y z] > Problem := [F,G]; 2 2 Problem := [[16 x y - 20 y , -9 z + 8, 15], 2 2 2 [11 x + 15 x y, 3 x - 17 x, -2 y - 6 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.9MB, alloc=32.3MB, time=0.56 memory used=47.9MB, alloc=56.3MB, time=0.96 N1 := 865 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=89.5MB, alloc=56.3MB, time=2.07 N2 := 69 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := 2 2 2 2 2 [16 x y - 20 y , -9 z + 8, 15, 11 x + 15 x y, 3 x - 17 x, -2 y - 6 y z] > J:=[op(GB),op(G)]; 2 2 2 J := [1, 11 x + 15 x y, 3 x - 17 x, -2 y - 6 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 10, 2, 2, 2, 2, 1/2, 1/2, 1/3, 5/11, 5/11, 2/11, 4, 5, 6, 2, 2, 2, 1, 1/2, 1/2, 1/4, 4/7, 3/7, 1/7, 3, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=97.7MB, alloc=56.3MB, time=2.20 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240941 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-2 x, -2 x y + 13 y, -7 x - 12 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [13 x y + 18 z, -2 x y + 15 y, -10 y + 17 y z] > Problem := [F,G]; 2 Problem := [[-2 x, -2 x y + 13 y, -7 x - 12 x z], 2 [13 x y + 18 z, -2 x y + 15 y, -10 y + 17 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.53 N1 := 337 > GB := Basis(F, plex(op(vars))); GB := [x, y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.0MB, alloc=32.3MB, time=0.95 N2 := 87 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-2 x, -2 x y + 13 y, -7 x - 12 x z, 13 y x + 18 z, -2 x y + 15 y, 2 -10 y + 17 y z] > J:=[op(GB),op(G)]; 2 J := [x, y, 13 y x + 18 z, -2 x y + 15 y, -10 y + 17 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 5/6, 2/3, 1/2, 1/2, 7/12, 1/4, 5, 9, 8, 2, 1, 2, 1, 3/5, 4/5, 2/5, 3/8, 3/4, 1/4, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=53.3MB, alloc=32.3MB, time=1.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240944 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-9 x + 7 y, 20 - 8 y, x y + 9 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [13 x z - 17, -12 y + 16, -x z - y z] > Problem := [F,G]; Problem := [ 2 2 2 [-9 x + 7 y, 20 - 8 y, x y + 9 y ], [13 x z - 17, -12 y + 16, -x z - y z] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=46.3MB, alloc=32.3MB, time=0.79 memory used=67.6MB, alloc=56.3MB, time=1.19 memory used=107.7MB, alloc=56.3MB, time=1.90 memory used=143.9MB, alloc=80.3MB, time=2.56 memory used=199.0MB, alloc=80.3MB, time=4.12 memory used=246.4MB, alloc=104.3MB, time=5.90 N1 := 1857 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 211 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [-9 x + 7 y, 20 - 8 y, x y + 9 y , 13 z x - 17, -12 y + 16, -x z - y z] > J:=[op(GB),op(G)]; 2 J := [1, 13 z x - 17, -12 y + 16, -x z - y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 1, 2/3, 5/6, 1/3, 1/3, 1/2, 1/4, 4, 6, 6, 2, 1, 2, 1, 1/2, 1/2, 1/2, 2/7, 2/7, 3/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=306.7MB, alloc=108.3MB, time=7.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428240967 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-19 x z - 16 x, -6 z - 8 x, -11 x z + 9 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [z - 7 y, -9 x y + 6 z , 9 x + 8 z] > Problem := [F,G]; 2 Problem := [[-19 x z - 16 x, -6 z - 8 x, -11 x z + 9 y z], 2 2 2 [z - 7 y, -9 x y + 6 z , 9 x + 8 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.50 memory used=76.6MB, alloc=68.3MB, time=1.27 memory used=123.5MB, alloc=68.3MB, time=1.97 memory used=167.8MB, alloc=68.3MB, time=2.66 memory used=212.4MB, alloc=92.3MB, time=3.50 memory used=276.7MB, alloc=116.3MB, time=4.73 memory used=357.2MB, alloc=140.3MB, time=6.26 memory used=451.0MB, alloc=172.3MB, time=8.13 memory used=551.6MB, alloc=196.3MB, time=10.90 memory used=660.5MB, alloc=220.3MB, time=14.85 memory used=785.2MB, alloc=244.3MB, time=19.82 memory used=933.9MB, alloc=244.3MB, time=25.79 memory used=1082.5MB, alloc=244.3MB, time=31.64 memory used=1231.1MB, alloc=268.3MB, time=37.52 memory used=1403.5MB, alloc=268.3MB, time=44.35 N1 := 5777 > GB := Basis(F, plex(op(vars))); 2 GB := [361 x + 192 x, 1083 x y + 704 x, 19 x z + 16 x, 171 y z + 176 x, 2 3 z + 4 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1578.5MB, alloc=268.3MB, time=49.35 memory used=1681.1MB, alloc=524.3MB, time=51.16 memory used=1862.6MB, alloc=548.3MB, time=54.16 memory used=2068.8MB, alloc=572.3MB, time=57.65 memory used=2293.6MB, alloc=596.3MB, time=61.56 memory used=2542.9MB, alloc=620.3MB, time=66.05 memory used=2801.8MB, alloc=644.3MB, time=71.27 memory used=3057.9MB, alloc=668.3MB, time=76.31 memory used=3322.2MB, alloc=692.3MB, time=81.38 memory used=3586.1MB, alloc=716.3MB, time=86.44 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241267 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [18 x - 11 x, -3 x + 19, 19 x z + 16 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [7 x z + 10 x, 17 x + 8 x z, 20 x y + 3 z] > Problem := [F,G]; 2 2 2 Problem := [[18 x - 11 x, -3 x + 19, 19 x z + 16 z ], 2 [7 x z + 10 x, 17 x + 8 x z, 20 x y + 3 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.48 memory used=48.0MB, alloc=32.3MB, time=0.85 memory used=66.9MB, alloc=56.3MB, time=1.18 memory used=106.4MB, alloc=56.3MB, time=2.19 N1 := 1029 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 111 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [18 x - 11 x, -3 x + 19, 19 x z + 16 z , 7 x z + 10 x, 17 x + 8 x z, 20 y x + 3 z] > J:=[op(GB),op(G)]; 2 J := [1, 7 x z + 10 x, 17 x + 8 x z, 20 y x + 3 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 1, 1/6, 2/3, 3/4, 1/12, 5/12, 4, 7, 6, 2, 2, 1, 1, 3/4, 1/4, 3/4, 5/7, 1/7, 3/7, 4, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=125.9MB, alloc=56.3MB, time=2.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241278 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [16 x - 15 x z, 3 + 7 z, -6 y - 18] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-14 x z - 3 y z, 15 x y + 6 z, 8 y] > Problem := [F,G]; Problem := [ 2 2 [16 x - 15 x z, 3 + 7 z, -6 y - 18], [-14 x z - 3 y z, 15 x y + 6 z, 8 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.47 memory used=48.0MB, alloc=32.3MB, time=0.81 N1 := 417 > GB := Basis(F, plex(op(vars))); 2 2 GB := [112 x + 45 x, y + 3, 7 z + 3] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=67.9MB, alloc=56.3MB, time=1.22 N2 := 195 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [16 x - 15 x z, 7 z + 3, -6 y - 18, -14 x z - 3 y z, 15 x y + 6 z, 8 y] > J:=[op(GB),op(G)]; 2 2 J := [112 x + 45 x, y + 3, 7 z + 3, -14 x z - 3 y z, 15 x y + 6 z, 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 1, 1/2, 2/3, 2/3, 1/3, 1/3, 5/12, 6, 10, 10, 2, 2, 2, 1, 1/2, 2/3, 1/2, 1/3, 1/3, 1/3, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=101.5MB, alloc=60.3MB, time=1.70 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241284 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [9 x - 9 x, 6 z + 6 y, 11 y z + 12 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [7 x + 8 z , -4 y , -12 - 9 x] > Problem := [F,G]; Problem := 2 2 2 2 2 [[9 x - 9 x, 6 z + 6 y, 11 y z + 12 z], [7 x + 8 z , -4 y , -12 - 9 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.52 N1 := 225 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x - x, 11 y + 12 y, 11 y z + 12 z, z + y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.0MB, alloc=32.3MB, time=0.87 memory used=68.6MB, alloc=56.3MB, time=1.21 N2 := 225 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [9 x - 9 x, 6 z + 6 y, 11 y z + 12 z, 8 z + 7 x , -4 y , -12 - 9 x] > J:=[op(GB),op(G)]; J := [ 2 2 2 2 2 2 x - x, 11 y + 12 y, 11 y z + 12 z, z + y, 8 z + 7 x , -4 y , -12 - 9 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/3, 1/4, 1/3, 7, 10, 13, 2, 2, 2, 2, 3/7, 4/7, 3/7, 2/7, 5/14, 2/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=74.1MB, alloc=56.3MB, time=1.32 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241288 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [7 y z - 19, -17 x + 12 y, 5 x + 5 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-4 x y - y z, 10 + 17 x, -16 x y - y] > Problem := [F,G]; 2 2 2 Problem := [[7 y z - 19, -17 x + 12 y, 5 x + 5 y ], [-4 x y - y z, 10 + 17 x, -16 x y - y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.50 N1 := 251 > GB := Basis(F, plex(op(vars))); 2 GB := [289 x + 144, 17 y + 12, 84 z + 323] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.9MB, alloc=32.3MB, time=0.86 N2 := 165 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [7 z y - 19, -17 x + 12 y, 5 x + 5 y , -4 x y - y z, 17 x + 10, -16 x y - y] > J:=[op(GB),op(G)]; J := 2 [289 x + 144, 17 y + 12, 84 z + 323, -4 x y - y z, 17 x + 10, -16 x y - y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 5/6, 5/6, 1/3, 5/12, 7/12, 1/6, 6, 9, 9, 2, 2, 1, 1, 2/3, 1/2, 1/3, 1/3, 5/12, 1/6, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=65.3MB, alloc=32.3MB, time=1.11 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241291 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [y z + y, -2 x + 17 y , -6 x y + 7 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [3 x y + 16 x z, -y + 9 z , -2 x z - 11 z ] > Problem := [F,G]; 2 2 2 Problem := [[y z + y, -2 x + 17 y , -6 x y + 7 z ], 2 2 2 [3 x y + 16 x z, -y + 9 z , -2 x z - 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.2MB, alloc=32.3MB, time=0.75 memory used=67.0MB, alloc=32.3MB, time=1.02 memory used=86.0MB, alloc=56.3MB, time=1.30 memory used=124.9MB, alloc=60.3MB, time=1.86 memory used=161.0MB, alloc=60.3MB, time=2.38 memory used=194.3MB, alloc=84.3MB, time=2.88 memory used=247.6MB, alloc=84.3MB, time=3.66 memory used=297.2MB, alloc=108.3MB, time=4.42 memory used=369.4MB, alloc=140.3MB, time=5.65 memory used=460.2MB, alloc=164.3MB, time=7.25 memory used=563.3MB, alloc=188.3MB, time=9.13 memory used=678.6MB, alloc=212.3MB, time=11.22 memory used=803.4MB, alloc=236.3MB, time=13.49 memory used=925.4MB, alloc=516.3MB, time=15.77 memory used=1069.8MB, alloc=540.3MB, time=18.40 memory used=1217.8MB, alloc=564.3MB, time=21.44 memory used=1357.0MB, alloc=588.3MB, time=25.72 memory used=1503.3MB, alloc=612.3MB, time=30.64 memory used=1660.6MB, alloc=636.3MB, time=36.25 memory used=1831.2MB, alloc=660.3MB, time=42.47 memory used=2015.3MB, alloc=684.3MB, time=49.44 memory used=2213.3MB, alloc=708.3MB, time=57.00 memory used=2424.1MB, alloc=732.3MB, time=65.66 memory used=2651.9MB, alloc=756.3MB, time=75.42 memory used=2903.7MB, alloc=780.3MB, time=86.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241592 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 z - 20 y, -16 y z + 11 x, -y - 6 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [3 x - 7 x y, 17 x + 4 z, -5 z + 2 y] > Problem := [F,G]; 2 2 Problem := [[19 z - 20 y, -16 y z + 11 x, -y - 6 x], 2 2 [3 x - 7 x y, 17 x + 4 z, -5 z + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.80 memory used=68.1MB, alloc=32.3MB, time=1.10 memory used=87.6MB, alloc=56.3MB, time=1.40 memory used=126.9MB, alloc=60.3MB, time=1.98 memory used=163.4MB, alloc=84.3MB, time=2.53 memory used=214.7MB, alloc=84.3MB, time=3.42 memory used=272.4MB, alloc=116.3MB, time=4.46 memory used=347.0MB, alloc=140.3MB, time=5.81 memory used=439.3MB, alloc=164.3MB, time=7.48 memory used=546.0MB, alloc=188.3MB, time=9.51 memory used=657.4MB, alloc=212.3MB, time=12.70 memory used=778.5MB, alloc=236.3MB, time=16.79 memory used=912.6MB, alloc=260.3MB, time=22.06 memory used=1070.6MB, alloc=260.3MB, time=28.23 memory used=1228.6MB, alloc=284.3MB, time=34.39 memory used=1410.6MB, alloc=284.3MB, time=41.43 memory used=1592.6MB, alloc=308.3MB, time=48.64 N1 := 6151 > GB := Basis(F, plex(op(vars))); 2 2 GB := [5285401 x + 5662310400 x, 2299 x y - 184320 x, y + 6 x, 2 209 x z + 1920 x, 16 y z - 11 x, 19 z - 20 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1802.8MB, alloc=308.3MB, time=55.67 memory used=1897.1MB, alloc=564.3MB, time=57.32 memory used=2114.2MB, alloc=564.3MB, time=60.89 memory used=2325.3MB, alloc=588.3MB, time=64.86 memory used=2558.4MB, alloc=612.3MB, time=69.31 memory used=2790.8MB, alloc=636.3MB, time=73.80 memory used=3019.8MB, alloc=660.3MB, time=78.24 memory used=3242.4MB, alloc=684.3MB, time=83.35 memory used=3460.2MB, alloc=708.3MB, time=91.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428241892 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-17 x y - 19 x z, -8 x - 11 x z, -4 x y + 15] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-11 z + 18 x, -9 z - 3 z, 13 y - 15 z] > Problem := [F,G]; 2 Problem := [[-17 x y - 19 x z, -8 x - 11 x z, -4 x y + 15], 2 2 2 [-11 z + 18 x, -9 z - 3 z, 13 y - 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.2MB, alloc=32.3MB, time=0.78 memory used=66.7MB, alloc=56.3MB, time=1.08 memory used=106.1MB, alloc=60.3MB, time=1.67 memory used=144.0MB, alloc=60.3MB, time=2.23 memory used=179.2MB, alloc=84.3MB, time=2.76 memory used=234.8MB, alloc=84.3MB, time=3.63 memory used=289.0MB, alloc=108.3MB, time=4.64 memory used=362.0MB, alloc=132.3MB, time=5.95 memory used=450.5MB, alloc=164.3MB, time=7.59 memory used=550.1MB, alloc=188.3MB, time=9.52 memory used=654.4MB, alloc=212.3MB, time=12.28 memory used=767.4MB, alloc=236.3MB, time=15.86 memory used=891.2MB, alloc=260.3MB, time=20.68 memory used=1039.0MB, alloc=284.3MB, time=26.51 memory used=1210.7MB, alloc=284.3MB, time=33.16 memory used=1382.4MB, alloc=308.3MB, time=39.71 memory used=1578.1MB, alloc=308.3MB, time=47.17 memory used=1773.7MB, alloc=308.3MB, time=54.68 memory used=1969.3MB, alloc=332.3MB, time=62.21 N1 := 7041 > GB := Basis(F, plex(op(vars))); 2 GB := [608 x - 2805, 187 y - 152 x, 11 z + 8 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2164.1MB, alloc=332.3MB, time=67.70 N2 := 1517 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-17 x y - 19 x z, -8 x - 11 x z, -4 x y + 15, -11 z + 18 x, -9 z - 3 z, 2 13 y - 15 z] > J:=[op(GB),op(G)]; 2 2 2 J := [608 x - 2805, 187 y - 152 x, 11 z + 8 x, -11 z + 18 x, -9 z - 3 z, 2 13 y - 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 1/2, 5/6, 1/2, 1/4, 1/2, 6, 10, 10, 2, 2, 2, 2, 2/3, 1/3, 2/3, 1/3, 1/6, 5/12, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2291.4MB, alloc=588.3MB, time=71.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242094 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [12 z - 10 x, 10 y z - 12, 4 x - 20 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [14 x y - 8 x, -x + 19 z, -18 x z + 19 z ] > Problem := [F,G]; 2 2 Problem := [[12 z - 10 x, 10 y z - 12, 4 x - 20 y z], 2 2 [14 x y - 8 x, -x + 19 z, -18 x z + 19 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=67.5MB, alloc=32.3MB, time=1.07 memory used=86.7MB, alloc=56.3MB, time=1.37 memory used=125.0MB, alloc=60.3MB, time=1.94 memory used=160.8MB, alloc=84.3MB, time=2.49 memory used=219.7MB, alloc=84.3MB, time=3.54 memory used=274.4MB, alloc=108.3MB, time=4.50 memory used=346.9MB, alloc=132.3MB, time=5.79 memory used=436.7MB, alloc=164.3MB, time=7.43 memory used=541.3MB, alloc=188.3MB, time=9.32 memory used=654.9MB, alloc=212.3MB, time=11.71 memory used=770.4MB, alloc=236.3MB, time=15.06 memory used=895.3MB, alloc=260.3MB, time=19.03 memory used=1029.6MB, alloc=284.3MB, time=24.26 memory used=1184.9MB, alloc=308.3MB, time=30.41 memory used=1364.2MB, alloc=332.3MB, time=37.50 memory used=1567.4MB, alloc=332.3MB, time=45.46 memory used=1770.6MB, alloc=332.3MB, time=53.53 memory used=1973.7MB, alloc=356.3MB, time=61.54 memory used=2200.8MB, alloc=356.3MB, time=70.46 memory used=2427.9MB, alloc=356.3MB, time=79.48 memory used=2655.0MB, alloc=380.3MB, time=88.48 memory used=2905.9MB, alloc=404.3MB, time=98.21 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242394 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-5 y z - 3 y, -17 y + 14 z, -2 z - 1] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x y + 15, 11 x z + 14, 11 z - 19 z] > Problem := [F,G]; 2 Problem := [[-5 y z - 3 y, -17 y + 14 z, -2 z - 1], 2 [-7 x y + 15, 11 x z + 14, 11 z - 19 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=46.7MB, alloc=32.3MB, time=0.76 memory used=67.5MB, alloc=56.3MB, time=1.12 memory used=109.1MB, alloc=60.3MB, time=1.85 memory used=143.1MB, alloc=84.3MB, time=2.86 N1 := 1067 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 83 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 H := [-5 y z - 3 y, -17 y + 14 z, -2 z - 1, -7 x y + 15, 11 z x + 14, 2 11 z - 19 z] > J:=[op(GB),op(G)]; 2 J := [1, -7 x y + 15, 11 z x + 14, 11 z - 19 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 1, 1, 2, 1/3, 1/2, 5/6, 1/6, 1/3, 1/2, 4, 5, 6, 2, 1, 1, 2, 1/2, 1/4, 1/2, 2/7, 1/7, 3/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=161.8MB, alloc=84.3MB, time=3.25 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242406 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-13 y z + 19 z, -19 y z - 10 z , 10 y z + 6 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-18 x + 12 x y, -6 x y + 17, 4 x + 13 z] > Problem := [F,G]; 2 Problem := [[-13 y z + 19 z, -19 y z - 10 z , 10 y z + 6 y], 2 2 [-18 x + 12 x y, -6 x y + 17, 4 x + 13 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=47.2MB, alloc=32.3MB, time=0.74 memory used=68.4MB, alloc=56.3MB, time=1.11 memory used=110.6MB, alloc=56.3MB, time=1.83 memory used=147.2MB, alloc=80.3MB, time=2.48 memory used=201.2MB, alloc=108.3MB, time=3.65 memory used=267.7MB, alloc=132.3MB, time=5.81 memory used=352.7MB, alloc=132.3MB, time=8.93 N1 := 2675 > GB := Basis(F, plex(op(vars))); GB := [y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=439.7MB, alloc=132.3MB, time=11.69 N2 := 199 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-13 y z + 19 z, -19 y z - 10 z , 10 y z + 6 y, -18 x + 12 x y, 2 -6 x y + 17, 4 x + 13 z] > J:=[op(GB),op(G)]; 2 2 J := [y, z, -18 x + 12 x y, -6 x y + 17, 4 x + 13 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 1/2, 5/6, 2/3, 1/3, 1/2, 1/2, 5, 8, 8, 2, 2, 1, 1, 3/5, 3/5, 2/5, 1/2, 3/8, 1/4, 4, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=446.7MB, alloc=132.3MB, time=11.82 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242444 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [8 x - 12 x z, -2 y z + 3 x, 10 y z + 15 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [7 x y + 2 y z, 13 x z - 8 z , 17 y z - 15] > Problem := [F,G]; 2 Problem := [[8 x - 12 x z, -2 y z + 3 x, 10 y z + 15 x], 2 [7 x y + 2 y z, 13 x z - 8 z , 17 y z - 15]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=67.1MB, alloc=32.3MB, time=1.06 memory used=85.9MB, alloc=56.3MB, time=1.34 memory used=124.4MB, alloc=60.3MB, time=1.89 memory used=160.1MB, alloc=60.3MB, time=2.40 memory used=195.6MB, alloc=84.3MB, time=3.03 memory used=250.5MB, alloc=108.3MB, time=4.02 memory used=323.1MB, alloc=108.3MB, time=5.30 memory used=389.0MB, alloc=132.3MB, time=6.48 memory used=471.3MB, alloc=164.3MB, time=7.97 memory used=567.7MB, alloc=188.3MB, time=9.73 memory used=672.9MB, alloc=212.3MB, time=12.52 memory used=786.1MB, alloc=236.3MB, time=15.96 memory used=909.4MB, alloc=260.3MB, time=20.60 memory used=1051.7MB, alloc=284.3MB, time=26.37 memory used=1217.9MB, alloc=284.3MB, time=33.01 memory used=1384.1MB, alloc=308.3MB, time=39.54 memory used=1574.2MB, alloc=308.3MB, time=46.99 memory used=1764.3MB, alloc=308.3MB, time=54.49 memory used=1954.4MB, alloc=332.3MB, time=62.08 memory used=2168.5MB, alloc=332.3MB, time=70.41 memory used=2382.6MB, alloc=356.3MB, time=78.88 N1 := 8159 > GB := Basis(F, plex(op(vars))); GB := [x, z y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2622.5MB, alloc=356.3MB, time=87.84 N2 := 127 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [8 x - 12 x z, -2 z y + 3 x, 10 y z + 15 x, 7 x y + 2 y z, 13 x z - 8 z , 17 z y - 15] > J:=[op(GB),op(G)]; 2 J := [x, z y, 7 x y + 2 y z, 13 x z - 8 z , 17 z y - 15] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 1, 2, 5/6, 2/3, 1, 1/2, 5/12, 7/12, 5, 10, 9, 2, 1, 1, 2, 3/5, 3/5, 4/5, 1/3, 4/9, 5/9, 5, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2626.6MB, alloc=356.3MB, time=87.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242708 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-20 + 12 x, -19 x z + 6, -11 x y + 3 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x y + 11, -8 x - 1, 15 x z + 11 y z] > Problem := [F,G]; Problem := [[-20 + 12 x, -19 x z + 6, -11 x y + 3 y z], 2 [-7 x y + 11, -8 x - 1, 15 x z + 11 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.50 memory used=47.7MB, alloc=32.3MB, time=0.88 N1 := 373 > GB := Basis(F, plex(op(vars))); GB := [3 x - 5, y, 95 z - 18] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=65.7MB, alloc=32.3MB, time=1.20 N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-20 + 12 x, -19 x z + 6, -11 x y + 3 y z, -7 x y + 11, -8 x - 1, 15 x z + 11 y z] > J:=[op(GB),op(G)]; 2 J := [3 x - 5, y, 95 z - 18, -7 x y + 11, -8 x - 1, 15 x z + 11 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 1, 1, 1/2, 1/2, 1/2, 1/3, 1/3, 6, 9, 9, 2, 2, 1, 1, 2/3, 1/2, 1/3, 4/11, 3/11, 3/11, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=74.0MB, alloc=32.3MB, time=1.34 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242712 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [13 x y + 11 y z, 20 x - 4 y, 4 x - 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [12 y + 2 y z, -17 x - 15, z - 11 z] > Problem := [F,G]; 2 Problem := [[13 x y + 11 y z, 20 x - 4 y, 4 x - 9 z], 2 2 2 [12 y + 2 y z, -17 x - 15, z - 11 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.83 memory used=68.8MB, alloc=56.3MB, time=1.21 memory used=109.7MB, alloc=80.3MB, time=2.13 N1 := 1041 > GB := Basis(F, plex(op(vars))); 3 2 GB := [x , -5 x + y, 9 z - 4 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=155.3MB, alloc=80.3MB, time=3.18 N2 := 433 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [13 x y + 11 y z, 20 x - 4 y, -9 z + 4 x, 12 y + 2 y z, -17 x - 15, 2 z - 11 z] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [x , -5 x + y, 9 z - 4 x, 12 y + 2 y z, -17 x - 15, z - 11 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 1/2, 2/3, 1/3, 5/12, 5/12, 6, 9, 12, 3, 3, 2, 2, 2/3, 1/3, 1/2, 1/3, 1/4, 1/3, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=183.7MB, alloc=84.3MB, time=3.76 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242724 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-4 y z - 16, -20 + y, 2 x + 17 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-6 x z + 10 z, 19 x y - 19 x z, -3 x y - 14 z] > Problem := [F,G]; 2 Problem := [[-4 y z - 16, -20 + y, 2 x + 17 x z], [-6 x z + 10 z, 19 x y - 19 x z, -3 x y - 14 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.2MB, alloc=32.3MB, time=0.78 memory used=67.6MB, alloc=56.3MB, time=1.12 memory used=109.9MB, alloc=60.3MB, time=1.85 memory used=147.1MB, alloc=84.3MB, time=2.52 memory used=202.1MB, alloc=108.3MB, time=3.88 memory used=268.7MB, alloc=108.3MB, time=6.39 N1 := 2049 > GB := Basis(F, plex(op(vars))); 2 GB := [10 x - 17 x, y - 20, 5 z + 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=336.0MB, alloc=108.3MB, time=8.26 N2 := 729 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-4 y z - 16, y - 20, 2 x + 17 x z, -6 x z + 10 z, 19 x y - 19 x z, -3 x y - 14 z] > J:=[op(GB),op(G)]; 2 J := [10 x - 17 x, y - 20, 5 z + 1, -6 x z + 10 z, 19 x y - 19 x z, -3 x y - 14 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 1, 2/3, 2/3, 5/6, 1/2, 1/3, 1/2, 6, 11, 10, 2, 2, 1, 1, 2/3, 1/2, 2/3, 1/2, 1/4, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=391.1MB, alloc=108.3MB, time=9.51 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242751 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [10 z + 10 y, -20 x + 11, 9 y - 1] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 z - 11 z, x - y, -17 - 5 z] > Problem := [F,G]; Problem := 2 2 2 2 2 [[10 z + 10 y, -20 x + 11, 9 y - 1], [6 z - 11 z, x - y, -17 - 5 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.81 memory used=68.3MB, alloc=56.3MB, time=1.18 memory used=108.2MB, alloc=80.3MB, time=1.94 N1 := 1223 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [20 x - 11, 9 y - 1, z + y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=163.4MB, alloc=80.3MB, time=3.47 memory used=222.5MB, alloc=84.3MB, time=4.47 memory used=279.1MB, alloc=108.3MB, time=5.97 N2 := 1223 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [10 z + 10 y, -20 x + 11, 9 y - 1, 6 z - 11 z, x - y, -17 - 5 z] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [20 x - 11, 9 y - 1, z + y, 6 z - 11 z, x - y, -17 - 5 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 11, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/6, 1/4, 1/3, 6, 8, 11, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/6, 1/4, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=300.0MB, alloc=108.3MB, time=6.60 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242769 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [7 x + 10 y, -16 x, 11 y - 15] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-3 x y + 13 x, 15 z + 14 x, 3 y ] > Problem := [F,G]; Problem := 2 2 2 [[7 x + 10 y, -16 x, 11 y - 15], [-3 x y + 13 x, 15 z + 14 x, 3 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.9MB, alloc=32.3MB, time=0.57 N1 := 313 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 45 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [10 y + 7 x, -16 x, 11 y - 15, -3 x y + 13 x, 15 z + 14 x, 3 y ] > J:=[op(GB),op(G)]; 2 2 J := [1, -3 x y + 13 x, 15 z + 14 x, 3 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 2, 2, 2/3, 2/3, 1/6, 5/12, 1/3, 1/12, 4, 5, 6, 2, 1, 2, 2, 1/2, 1/2, 1/4, 3/7, 2/7, 1/7, 4, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=45.7MB, alloc=32.3MB, time=0.88 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428242771 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [8 x z + 12, -3 x z - 15 x, 9 y z + 6 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [x z - 7 y, -2 x + 20 x z, 15 x y - 3 y z] > Problem := [F,G]; 2 Problem := [[8 x z + 12, -3 x z - 15 x, 9 y z + 6 z ], 2 [x z - 7 y, -2 x + 20 x z, 15 x y - 3 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=46.9MB, alloc=32.3MB, time=0.77 memory used=94.4MB, alloc=68.3MB, time=1.46 memory used=138.9MB, alloc=68.3MB, time=2.12 memory used=182.4MB, alloc=92.3MB, time=2.87 memory used=245.0MB, alloc=116.3MB, time=3.96 memory used=323.8MB, alloc=148.3MB, time=5.37 memory used=417.3MB, alloc=172.3MB, time=7.02 memory used=522.6MB, alloc=196.3MB, time=9.09 memory used=632.3MB, alloc=220.3MB, time=12.11 memory used=750.8MB, alloc=244.3MB, time=16.15 memory used=883.6MB, alloc=268.3MB, time=21.28 memory used=1040.3MB, alloc=292.3MB, time=27.23 memory used=1221.0MB, alloc=292.3MB, time=34.19 memory used=1401.7MB, alloc=292.3MB, time=41.16 memory used=1582.3MB, alloc=316.3MB, time=48.10 memory used=1786.9MB, alloc=316.3MB, time=55.99 memory used=1991.4MB, alloc=340.3MB, time=63.87 N1 := 7291 > GB := Basis(F, plex(op(vars))); GB := [10 x - 3, 3 y - 10, z + 5] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2208.9MB, alloc=340.3MB, time=70.39 N2 := 1541 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [8 x z + 12, -3 x z - 15 x, 9 y z + 6 z , z x - 7 y, -2 x + 20 x z, 15 x y - 3 y z] > J:=[op(GB),op(G)]; 2 J := [10 x - 3, 3 y - 10, z + 5, z x - 7 y, -2 x + 20 x z, 15 x y - 3 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 1, 2, 5/6, 1/2, 1, 7/12, 1/3, 7/12, 6, 11, 9, 2, 2, 1, 1, 2/3, 1/2, 2/3, 5/12, 1/3, 1/3, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2331.0MB, alloc=596.3MB, time=74.14 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243008 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [x z + 9 y, -7 - 20 z, -5 y - 7] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [2 x z - 14 y z, -20 y + 20 z, -14 y - 11 z] > Problem := [F,G]; 2 Problem := [[x z + 9 y, -7 - 20 z, -5 y - 7], 2 [2 x z - 14 y z, -20 y + 20 z, -14 y - 11 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.77 memory used=67.3MB, alloc=32.3MB, time=1.06 memory used=86.9MB, alloc=32.3MB, time=1.35 memory used=105.1MB, alloc=56.3MB, time=1.66 memory used=146.3MB, alloc=60.3MB, time=2.44 memory used=181.5MB, alloc=84.3MB, time=3.20 N1 := 1201 > GB := Basis(F, plex(op(vars))); 2 GB := [7 x + 6480, -7 x + 180 y, 20 z + 7] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=232.4MB, alloc=84.3MB, time=4.65 memory used=289.1MB, alloc=108.3MB, time=5.61 N2 := 893 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [z x + 9 y, -7 - 20 z, -5 y - 7, 2 x z - 14 y z, -20 y + 20 z, -14 y - 11 z] > J:=[op(GB),op(G)]; 2 2 J := [7 x + 6480, -7 x + 180 y, 20 z + 7, 2 x z - 14 y z, -20 y + 20 z, -14 y - 11 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 2, 1, 1/3, 5/6, 5/6, 1/6, 5/12, 1/2, 6, 11, 9, 2, 2, 2, 1, 1/2, 2/3, 2/3, 1/4, 1/3, 5/12, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=342.4MB, alloc=108.3MB, time=6.89 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243032 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-15 x z + 17 x, -20 z - 17, -11 y z + 9 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [20 + 4 y, -16 y z + y, 20 y] > Problem := [F,G]; Problem := [ 2 [-15 x z + 17 x, -20 z - 17, -11 y z + 9 y], [20 + 4 y, -16 y z + y, 20 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 N1 := 105 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y, 20 z + 17] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=26.7MB, alloc=32.3MB, time=0.53 N2 := 45 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-15 x z + 17 x, -20 z - 17, -11 y z + 9 y, 20 + 4 y, -16 y z + y, 20 y] > J:=[op(GB),op(G)]; 2 J := [x, y, 20 z + 17, 20 + 4 y, -16 y z + y, 20 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 1, 2, 1/6, 2/3, 2/3, 1/6, 1/2, 1/3, 6, 7, 8, 2, 1, 1, 2, 1/6, 2/3, 1/3, 1/10, 1/2, 1/5, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=26.9MB, alloc=32.3MB, time=0.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243034 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [2 y z - 12 x, -11 x - 15, 6 x + 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 - 19 y, 6 y z - 20 x, -8 y + z ] > Problem := [F,G]; 2 Problem := [[2 y z - 12 x, -11 x - 15, 6 x + 2 z], 2 2 [11 - 19 y, 6 y z - 20 x, -8 y + z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.78 memory used=66.5MB, alloc=56.3MB, time=1.09 memory used=109.8MB, alloc=60.3MB, time=1.86 memory used=147.0MB, alloc=84.3MB, time=2.53 memory used=203.5MB, alloc=108.3MB, time=3.61 memory used=278.0MB, alloc=116.3MB, time=4.99 memory used=345.6MB, alloc=140.3MB, time=6.23 memory used=428.5MB, alloc=164.3MB, time=8.29 memory used=520.1MB, alloc=188.3MB, time=11.18 memory used=624.1MB, alloc=212.3MB, time=15.17 memory used=746.3MB, alloc=236.3MB, time=20.08 memory used=892.5MB, alloc=236.3MB, time=25.79 memory used=1038.7MB, alloc=236.3MB, time=31.54 memory used=1184.8MB, alloc=260.3MB, time=37.31 memory used=1354.9MB, alloc=260.3MB, time=43.88 N1 := 5825 > GB := Basis(F, plex(op(vars))); 2 GB := [11 x + 15, y + 2, z + 3 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1528.9MB, alloc=260.3MB, time=49.33 memory used=1664.4MB, alloc=540.3MB, time=52.02 memory used=1869.2MB, alloc=564.3MB, time=60.29 N2 := 2855 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 [2 y z - 12 x, -11 x - 15, 6 x + 2 z, 11 - 19 y, 6 y z - 20 x, -8 y + z ] > J:=[op(GB),op(G)]; 2 2 2 J := [11 x + 15, y + 2, z + 3 x, 11 - 19 y, 6 y z - 20 x, -8 y + z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 2, 2, 2/3, 2/3, 2/3, 1/3, 1/3, 1/3, 6, 10, 9, 2, 2, 2, 2, 1/2, 2/3, 1/2, 1/4, 1/3, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1949.3MB, alloc=564.3MB, time=63.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243238 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-3 - 5 y, 8 x - 2, 15 x z + 11 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-8 x y + 8, -8 y - 8 z, -14 x + 12 z ] > Problem := [F,G]; 2 Problem := [[-3 - 5 y, 8 x - 2, 15 x z + 11 y], 2 2 [-8 x y + 8, -8 y - 8 z, -14 x + 12 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=69.1MB, alloc=56.3MB, time=1.19 memory used=111.2MB, alloc=60.3MB, time=1.93 memory used=148.7MB, alloc=84.3MB, time=2.60 memory used=205.7MB, alloc=84.3MB, time=3.61 memory used=255.9MB, alloc=108.3MB, time=4.72 memory used=320.6MB, alloc=132.3MB, time=6.69 memory used=399.7MB, alloc=156.3MB, time=9.73 memory used=502.9MB, alloc=156.3MB, time=13.69 N1 := 3259 > GB := Basis(F, plex(op(vars))); 2 GB := [4 x - 1, 5 y + 3, 25 z - 44 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=607.5MB, alloc=156.3MB, time=17.39 memory used=657.5MB, alloc=164.3MB, time=18.30 memory used=778.1MB, alloc=188.3MB, time=21.63 N2 := 1589 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 [-3 - 5 y, 8 x - 2, 15 z x + 11 y, -8 x y + 8, -8 y - 8 z, -14 x + 12 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [4 x - 1, 5 y + 3, 25 z - 44 x, -8 x y + 8, -8 y - 8 z, -14 x + 12 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 1, 2, 2/3, 2/3, 1/2, 1/3, 1/3, 1/4, 6, 10, 9, 2, 2, 1, 2, 2/3, 1/2, 1/2, 1/3, 1/4, 1/4, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=807.4MB, alloc=188.3MB, time=22.67 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243304 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [6 y, -19 y + 3, -14 x + 5 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [19 x - 14 z, -19 z - 9 z, -16 y z + 7 z ] > Problem := [F,G]; 2 2 Problem := [[6 y, -19 y + 3, -14 x + 5 x z], 2 2 2 [19 x - 14 z, -19 z - 9 z, -16 y z + 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=48.1MB, alloc=32.3MB, time=0.83 memory used=68.1MB, alloc=56.3MB, time=1.20 memory used=108.6MB, alloc=56.3MB, time=1.90 memory used=142.0MB, alloc=80.3MB, time=2.64 memory used=191.4MB, alloc=80.3MB, time=4.41 N1 := 1777 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=242.1MB, alloc=80.3MB, time=5.90 N2 := 145 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 6 y, -19 y + 3, -14 x + 5 x z, 19 x - 14 z, -19 z - 9 z, -16 y z + 7 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [1, 19 x - 14 z, -19 z - 9 z, -16 y z + 7 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 1/3, 1/2, 2/3, 1/4, 1/4, 1/2, 4, 5, 6, 2, 2, 1, 2, 1/4, 1/4, 3/4, 1/7, 1/7, 5/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=245.1MB, alloc=80.3MB, time=5.97 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243323 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-15 x z - 19 x, -10 x + 6 z, -4 x + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-10 y , -15 x z - 16 y , -17 x + 3 z] > Problem := [F,G]; 2 2 Problem := [[-15 x z - 19 x, -10 x + 6 z, -4 x + 19 y], 2 2 2 [-10 y , -15 x z - 16 y , -17 x + 3 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.50 memory used=48.7MB, alloc=32.3MB, time=0.87 memory used=68.9MB, alloc=56.3MB, time=1.24 N1 := 737 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [25 x + 19 x, -4 x + 19 y, -5 x + 3 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.9MB, alloc=56.3MB, time=2.19 memory used=150.2MB, alloc=84.3MB, time=2.99 N2 := 431 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-15 x z - 19 x, -10 x + 6 z, -4 x + 19 y, -10 y , -15 x z - 16 y , 2 -17 x + 3 z] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [25 x + 19 x, -4 x + 19 y, -5 x + 3 z, -10 y , -15 x z - 16 y , 2 -17 x + 3 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 1, 5/6, 1/2, 2/3, 1/2, 1/4, 1/3, 6, 11, 13, 3, 3, 2, 1, 5/6, 1/2, 1/2, 1/2, 1/4, 1/4, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=152.4MB, alloc=84.3MB, time=3.05 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243333 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-4 x z - 4 y , -11 x y - 16 z, 14 x z - 16 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [5, 2 x + 10, x - 9 y] > Problem := [F,G]; Problem := 2 2 2 [[-4 x z - 4 y , -11 x y - 16 z, 14 x z - 16 y ], [5, 2 x + 10, x - 9 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.51 memory used=48.7MB, alloc=56.3MB, time=0.94 N1 := 311 > GB := Basis(F, plex(op(vars))); 2 2 GB := [y x , y , 11 y x + 16 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 39 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-4 x z - 4 y , -11 x y - 16 z, 14 x z - 16 y , 5, 2 x + 10, -9 y + x] > J:=[op(GB),op(G)]; 2 2 2 J := [y x , y , 11 y x + 16 z, 5, 2 x + 10, -9 y + x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 2, 2, 1, 5/6, 2/3, 1/2, 5/11, 4/11, 3/11, 6, 9, 10, 3, 2, 2, 1, 2/3, 2/3, 1/6, 4/11, 4/11, 1/11, 3, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=57.3MB, alloc=56.3MB, time=1.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243336 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 x - 18 y, 8 y - 4 z, -16 x z + 7 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-20 z - 17 y, 5 x - 2 y , 9 x + 11 x] > Problem := [F,G]; 2 Problem := [[-8 x - 18 y, 8 y - 4 z, -16 x z + 7 y], 2 2 2 2 [-20 z - 17 y, 5 x - 2 y , 9 x + 11 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.50 memory used=48.0MB, alloc=32.3MB, time=0.84 memory used=69.2MB, alloc=56.3MB, time=1.23 memory used=110.9MB, alloc=60.3MB, time=1.98 memory used=148.9MB, alloc=84.3MB, time=2.67 memory used=205.9MB, alloc=108.3MB, time=4.02 memory used=274.4MB, alloc=108.3MB, time=6.62 N1 := 2107 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [32 x - 7 x , 4 x + 9 y, 8 x + 9 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=342.4MB, alloc=108.3MB, time=9.01 memory used=419.6MB, alloc=140.3MB, time=10.48 N2 := 1027 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-8 x - 18 y, 8 y - 4 z, -16 x z + 7 y, -20 z - 17 y, -2 y + 5 x , 2 9 x + 11 x] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 2 J := [32 x - 7 x , 4 x + 9 y, 8 x + 9 z, -20 z - 17 y, -2 y + 5 x , 2 9 x + 11 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 2/3, 5/6, 1/2, 5/12, 5/12, 1/4, 6, 10, 13, 3, 3, 2, 2, 5/6, 1/2, 1/3, 7/12, 1/4, 1/6, 2, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=462.8MB, alloc=140.3MB, time=11.82 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243370 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-2 x y - 20 x, -10 z + y, 9 x z - 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [13 y z + 19, 18 z, 12 x y - 2 y] > Problem := [F,G]; Problem := [ 2 [-2 x y - 20 x, -10 z + y, 9 x z - 9 z], [13 y z + 19, 18 z, 12 x y - 2 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.53 N1 := 301 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x - x, y + 10 x, x z - z, z + x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.6MB, alloc=32.3MB, time=0.90 memory used=67.6MB, alloc=56.3MB, time=1.24 N2 := 335 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-2 x y - 20 x, -10 z + y, 9 x z - 9 z, 13 z y + 19, 18 z, 12 x y - 2 y] > J:=[op(GB),op(G)]; 2 2 J := [x - x, y + 10 x, x z - z, z + x, 13 z y + 19, 18 z, 12 x y - 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 1, 2, 1/2, 2/3, 2/3, 1/3, 5/12, 5/12, 7, 12, 12, 2, 2, 1, 2, 5/7, 3/7, 4/7, 3/7, 2/7, 5/14, -1, -1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=84.8MB, alloc=56.3MB, time=1.58 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243374 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [19 z + 6 z, -6 x y + 10 z, 19 - 3 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 y z + 9 x, 2 z + 5, -13 x y - 9 y ] > Problem := [F,G]; 2 Problem := [[19 z + 6 z, -6 x y + 10 z, 19 - 3 y], 2 2 [6 y z + 9 x, 2 z + 5, -13 x y - 9 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.2MB, alloc=32.3MB, time=0.78 memory used=67.2MB, alloc=32.3MB, time=1.08 memory used=86.2MB, alloc=56.3MB, time=1.37 memory used=124.8MB, alloc=60.3MB, time=2.02 memory used=161.4MB, alloc=84.3MB, time=2.68 memory used=216.5MB, alloc=108.3MB, time=3.84 N1 := 1391 > GB := Basis(F, plex(op(vars))); 2 GB := [361 x + 30 x, 3 y - 19, -19 x + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=283.5MB, alloc=108.3MB, time=5.88 N2 := 323 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 19 z + 6 z, -6 x y + 10 z, 19 - 3 y, 6 y z + 9 x, 2 z + 5, -13 x y - 9 y ] > J:=[op(GB),op(G)]; J := [ 2 2 2 361 x + 30 x, 3 y - 19, -19 x + 5 z, 6 y z + 9 x, 2 z + 5, -13 x y - 9 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 5/12, 6, 10, 10, 2, 2, 2, 2, 2/3, 1/2, 1/2, 5/12, 1/3, 1/4, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=328.8MB, alloc=108.3MB, time=6.66 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243392 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-15 x z - 13, 8 x + 12 x, -15 x y + 16 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [2 x z + 7, -5 x - 20 x, 2 y - 8 y z] > Problem := [F,G]; 2 Problem := [[-15 x z - 13, 8 x + 12 x, -15 x y + 16 y], 2 2 [2 x z + 7, -5 x - 20 x, 2 y - 8 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.53 memory used=48.6MB, alloc=56.3MB, time=0.95 N1 := 369 > GB := Basis(F, plex(op(vars))); GB := [2 x + 3, y, 45 z - 26] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 361 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-15 x z - 13, 8 x + 12 x, -15 x y + 16 y, 2 z x + 7, -5 x - 20 x, 2 2 y - 8 y z] > J:=[op(GB),op(G)]; 2 2 J := [2 x + 3, y, 45 z - 26, 2 z x + 7, -5 x - 20 x, 2 y - 8 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 1, 5/6, 1/3, 1/2, 7/12, 1/3, 1/4, 6, 8, 9, 2, 2, 2, 1, 1/2, 1/3, 1/2, 4/11, 3/11, 3/11, 2, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=89.1MB, alloc=60.3MB, time=1.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243397 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 2 F := [17 x - 2 z , 7 x - 13 z , 6 z - 15 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-18 + 9 x, -16 x + 19 y , 3 x - 10 z ] > Problem := [F,G]; 2 2 2 2 2 Problem := [[17 x - 2 z , 7 x - 13 z , 6 z - 15 x], 2 2 2 2 [-18 + 9 x, -16 x + 19 y , 3 x - 10 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=27.4MB, alloc=32.3MB, time=0.55 memory used=51.3MB, alloc=32.3MB, time=0.96 memory used=69.3MB, alloc=56.3MB, time=1.37 N1 := 779 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 149 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 2 H := [-2 z + 17 x , -13 z + 7 x , 6 z - 15 x, -18 + 9 x, -16 x + 19 y , 2 2 -10 z + 3 x ] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x, z , -18 + 9 x, -16 x + 19 y , -10 z + 3 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1, 1/6, 2/3, 1/2, 1/12, 1/3, 5, 7, 8, 2, 2, 2, 2, 4/5, 1/5, 2/5, 4/9, 1/9, 2/9, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=96.1MB, alloc=56.3MB, time=1.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243403 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-14 x y + 4 y , -18 y + 3 z, 6 z + 8] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-z + 16 y, -2 x y + 10 x, 6 + 6 y] > Problem := [F,G]; 2 2 2 Problem := [[-14 x y + 4 y , -18 y + 3 z, 6 z + 8], 2 [-z + 16 y, -2 x y + 10 x, 6 + 6 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.78 memory used=69.2MB, alloc=32.3MB, time=1.18 memory used=88.1MB, alloc=56.3MB, time=1.53 N1 := 621 > GB := Basis(F, plex(op(vars))); 4 2 GB := [64827 x + 16, -7 x + 2 y, -147 x + 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=126.6MB, alloc=60.3MB, time=2.32 memory used=166.5MB, alloc=84.3MB, time=3.01 N2 := 663 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 -14 x y + 4 y , -18 y + 3 z, 6 z + 8, -z + 16 y, -2 x y + 10 x, 6 + 6 y] > J:=[op(GB),op(G)]; 4 2 2 J := [64827 x + 16, -7 x + 2 y, -147 x + 2 z, -z + 16 y, -2 x y + 10 x, 6 + 6 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 1, 2, 2, 1/3, 5/6, 1/2, 1/4, 1/2, 1/4, 6, 10, 12, 4, 4, 1, 2, 2/3, 2/3, 1/3, 5/12, 1/3, 1/6, 0, -1, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=193.3MB, alloc=84.3MB, time=3.67 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243414 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 y - 20 z , 11 + 3 z, 9 x z - 19] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-1 + 3 x, -y + 10 x, -7 - 2 z] > Problem := [F,G]; Problem := 2 2 2 [[19 y - 20 z , 11 + 3 z, 9 x z - 19], [-1 + 3 x, -y + 10 x, -7 - 2 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.83 memory used=68.8MB, alloc=56.3MB, time=1.22 memory used=110.0MB, alloc=56.3MB, time=1.95 memory used=146.0MB, alloc=80.3MB, time=2.62 memory used=199.8MB, alloc=108.3MB, time=3.76 memory used=266.0MB, alloc=132.3MB, time=5.75 memory used=348.3MB, alloc=132.3MB, time=8.76 memory used=430.5MB, alloc=156.3MB, time=11.77 N1 := 3035 > GB := Basis(F, plex(op(vars))); 2 GB := [33 x + 19, 171 y - 2420, 3 z + 11] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 315 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-20 z + 19 y , 3 z + 11, 9 z x - 19, 3 x - 1, -y + 10 x, -7 - 2 z] > J:=[op(GB),op(G)]; 2 2 J := [33 x + 19, 171 y - 2420, 3 z + 11, 3 x - 1, -y + 10 x, -7 - 2 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 9, 2, 1, 2, 2, 1/2, 1/3, 2/3, 1/4, 1/6, 1/3, 6, 7, 8, 2, 1, 2, 1, 1/2, 1/3, 1/3, 1/4, 1/6, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=523.1MB, alloc=156.3MB, time=14.28 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243459 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-13 x y - z, 18 x + y, 13 z + 18 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-20 y + y z, -10 x z + 4 y , 6 y + 2] > Problem := [F,G]; 2 2 Problem := [[-13 x y - z, 18 x + y, 13 z + 18 z], 2 2 2 [-20 y + y z, -10 x z + 4 y , 6 y + 2]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=68.2MB, alloc=32.3MB, time=1.08 memory used=87.9MB, alloc=32.3MB, time=1.37 memory used=106.5MB, alloc=56.3MB, time=1.66 memory used=144.4MB, alloc=60.3MB, time=2.26 memory used=181.8MB, alloc=84.3MB, time=2.96 memory used=237.4MB, alloc=116.3MB, time=4.02 memory used=310.8MB, alloc=140.3MB, time=5.39 memory used=396.2MB, alloc=164.3MB, time=7.73 memory used=488.6MB, alloc=188.3MB, time=11.43 memory used=605.1MB, alloc=188.3MB, time=16.05 N1 := 3461 > GB := Basis(F, plex(op(vars))); 6 3 2 3 GB := [169 x + x , 18 x + y, -234 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=722.5MB, alloc=188.3MB, time=20.51 memory used=840.6MB, alloc=468.3MB, time=22.69 N2 := 905 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-13 x y - z, 18 x + y, 13 z + 18 z, -20 y + y z, -10 x z + 4 y , 2 6 y + 2] > J:=[op(GB),op(G)]; J := [ 6 3 2 3 2 2 2 169 x + x , 18 x + y, -234 x + z, -20 y + y z, -10 x z + 4 y , 6 y + 2 ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 1/2, 5/12, 6, 11, 17, 6, 6, 2, 1, 2/3, 2/3, 1/2, 5/12, 5/12, 1/4, 1, -5, -4] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=868.9MB, alloc=468.3MB, time=23.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243528 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-14 x y + 9 x, -15 x - 19 z , y - 10 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [9 x y - 12 z , -17 x z - 19 y, 2 y z - 2 z ] > Problem := [F,G]; 2 2 2 Problem := [[-14 x y + 9 x, -15 x - 19 z , y - 10 x], 2 2 [9 x y - 12 z , -17 x z - 19 y, 2 y z - 2 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.80 memory used=67.9MB, alloc=32.3MB, time=1.11 memory used=87.1MB, alloc=56.3MB, time=1.41 memory used=126.8MB, alloc=60.3MB, time=2.00 memory used=164.3MB, alloc=60.3MB, time=2.56 memory used=200.4MB, alloc=84.3MB, time=3.18 memory used=258.1MB, alloc=108.3MB, time=4.25 memory used=335.3MB, alloc=116.3MB, time=5.66 memory used=403.2MB, alloc=140.3MB, time=7.28 memory used=479.2MB, alloc=164.3MB, time=10.15 memory used=576.4MB, alloc=188.3MB, time=13.95 N1 := 2623 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [1960 x - 81 x, 14 x y - 9 x, y - 10 x, 7448 z + 243 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=697.3MB, alloc=188.3MB, time=16.30 memory used=812.8MB, alloc=444.3MB, time=18.25 memory used=948.4MB, alloc=468.3MB, time=20.73 memory used=1095.0MB, alloc=492.3MB, time=23.58 memory used=1237.1MB, alloc=516.3MB, time=28.43 memory used=1385.5MB, alloc=540.3MB, time=34.60 memory used=1557.9MB, alloc=564.3MB, time=41.65 memory used=1754.3MB, alloc=588.3MB, time=49.76 N2 := 5047 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-14 x y + 9 x, -15 x - 19 z , y - 10 x, 9 x y - 12 z , -17 x z - 19 y, 2 2 y z - 2 z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [1960 x - 81 x, 14 x y - 9 x, y - 10 x, 7448 z + 243 x, 9 x y - 12 z , 2 -17 x z - 19 y, 2 y z - 2 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 5/6, 2/3, 1/2, 5/12, 5/12, 7, 15, 14, 2, 2, 2, 2, 6/7, 5/7, 4/7, 4/7, 5/14, 5/14, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1896.8MB, alloc=588.3MB, time=55.46 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243695 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [y + 15 z , 11 x z - 11, 8 x - 16 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-4 y z + 2 z, -x + 8 z, -6 y z - 2 z] > Problem := [F,G]; 2 2 2 2 Problem := [[y + 15 z , 11 x z - 11, 8 x - 16 y ], 2 [-4 y z + 2 z, -x + 8 z, -6 y z - 2 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=47.3MB, alloc=32.3MB, time=0.80 memory used=67.8MB, alloc=32.3MB, time=1.09 memory used=87.4MB, alloc=56.3MB, time=1.44 memory used=127.8MB, alloc=56.3MB, time=2.16 memory used=163.7MB, alloc=80.3MB, time=3.08 N1 := 1021 > GB := Basis(F, plex(op(vars))); 4 2 2 3 GB := [x + 30, -x + 2 y , x + 30 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=203.7MB, alloc=80.3MB, time=3.96 N2 := 703 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [15 z + y , 11 x z - 11, 8 x - 16 y , -4 y z + 2 z, -x + 8 z, -6 y z - 2 z] > J:=[op(GB),op(G)]; 4 2 2 3 2 J := [x + 30, -x + 2 y , x + 30 z, -4 y z + 2 z, -x + 8 z, -6 y z - 2 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 2/3, 5/6, 1/4, 1/3, 7/12, 6, 11, 15, 4, 4, 2, 1, 2/3, 1/2, 2/3, 1/3, 1/4, 1/2, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=263.9MB, alloc=84.3MB, time=5.21 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243709 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-2 x z + 18 z , 17 z + 14 y, 4 x y - 17 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-x - 12 y , -6 y z + 20 x, -5 x y + 4 y] > Problem := [F,G]; 2 2 2 Problem := [[-2 x z + 18 z , 17 z + 14 y, 4 x y - 17 z ], 2 2 [-x - 12 y , -6 y z + 20 x, -5 x y + 4 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=68.3MB, alloc=32.3MB, time=1.11 memory used=88.2MB, alloc=32.3MB, time=1.40 memory used=107.0MB, alloc=56.3MB, time=1.69 memory used=147.7MB, alloc=60.3MB, time=2.36 memory used=188.6MB, alloc=84.3MB, time=3.08 memory used=248.2MB, alloc=108.3MB, time=4.17 memory used=322.4MB, alloc=140.3MB, time=6.09 memory used=404.7MB, alloc=140.3MB, time=9.20 N1 := 2303 > GB := Basis(F, plex(op(vars))); 2 2 GB := [2 x y + 7 y, 648 y + 119 y, 17 x z + 126 y, 18 y z + 7 y, 17 z + 14 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=488.9MB, alloc=140.3MB, time=11.50 memory used=579.0MB, alloc=164.3MB, time=13.00 memory used=697.7MB, alloc=444.3MB, time=15.24 memory used=824.1MB, alloc=468.3MB, time=19.91 N2 := 2119 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-2 x z + 18 z , 17 z + 14 y, -17 z + 4 y x, -x - 12 y , -6 y z + 20 x, -5 x y + 4 y] > J:=[op(GB),op(G)]; 2 2 J := [2 x y + 7 y, 648 y + 119 y, 17 z x + 126 y, 18 y z + 7 y, 17 z + 14 y, 2 2 -x - 12 y , -6 y z + 20 x, -5 x y + 4 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 5/6, 2/3, 5/12, 1/2, 5/12, 8, 17, 16, 2, 2, 2, 2, 5/8, 1, 1/2, 5/16, 3/4, 1/4, -3, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=868.1MB, alloc=468.3MB, time=21.55 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243772 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 y z, 15 z - 15 z, -19 y - 5] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-10 y - 6 x, 13 y z + 13 y, -12 x y - 16] > Problem := [F,G]; 2 2 Problem := [[-18 y z, 15 z - 15 z, -19 y - 5], 2 [-10 y - 6 x, 13 y z + 13 y, -12 x y - 16]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 301 > GB := Basis(F, plex(op(vars))); 2 GB := [19 y + 5, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=55.3MB, alloc=68.3MB, time=1.02 N2 := 215 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-18 y z, 15 z - 15 z, -19 y - 5, -10 y - 6 x, 13 y z + 13 y, -12 x y - 16] > J:=[op(GB),op(G)]; 2 2 J := [19 y + 5, z, -10 y - 6 x, 13 y z + 13 y, -12 x y - 16] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 1, 2, 2, 1/3, 5/6, 1/2, 2/13, 6/13, 4/13, 5, 8, 9, 2, 1, 2, 1, 2/5, 4/5, 2/5, 2/9, 5/9, 2/9, 2, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=74.4MB, alloc=68.3MB, time=1.32 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243775 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [4 x y + x, x z + 2 y z, 20 y - 7 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [2 - 5 y, -11 - 19 z, -2 x y + 12 x] > Problem := [F,G]; Problem := [ 2 [4 x y + x, x z + 2 y z, 20 y - 7 y], [2 - 5 y, -11 - 19 z, -2 x y + 12 x] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.4MB, alloc=32.3MB, time=0.18 memory used=25.9MB, alloc=32.3MB, time=0.46 memory used=48.1MB, alloc=32.3MB, time=0.85 memory used=66.7MB, alloc=56.3MB, time=1.24 N1 := 665 > GB := Basis(F, plex(op(vars))); 2 GB := [x, 20 y - 7 y, z y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [4 x y + x, x z + 2 y z, 20 y - 7 y, 2 - 5 y, -11 - 19 z, -2 x y + 12 x] > J:=[op(GB),op(G)]; 2 J := [x, 20 y - 7 y, z y, 2 - 5 y, -11 - 19 z, -2 x y + 12 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 1, 2, 1, 1/2, 5/6, 1/3, 5/12, 1/2, 1/4, 6, 8, 9, 2, 1, 2, 1, 1/3, 2/3, 1/3, 3/11, 5/11, 2/11, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=94.2MB, alloc=56.3MB, time=1.82 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243780 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [16 x + y , -8 x z + 3, 15 y z + 6 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-12 y + 4 z , 17 x y + 6, 4 x y - 9 x] > Problem := [F,G]; 2 2 2 Problem := [[16 x + y , -8 x z + 3, 15 y z + 6 z ], 2 2 [-12 y + 4 z , 17 x y + 6, 4 x y - 9 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=68.4MB, alloc=32.3MB, time=1.11 memory used=88.8MB, alloc=56.3MB, time=1.50 memory used=129.7MB, alloc=84.3MB, time=2.26 memory used=187.2MB, alloc=84.3MB, time=4.07 N1 := 1261 > GB := Basis(F, plex(op(vars))); 4 3 3 GB := [6400 x + 9, -320 x + 3 y, 800 x + 3 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=240.0MB, alloc=84.3MB, time=4.97 memory used=299.2MB, alloc=108.3MB, time=6.22 N2 := 1137 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [y + 16 x , -8 x z + 3, 15 y z + 6 z , -12 y + 4 z , 17 y x + 6, 4 x y - 9 x] > J:=[op(GB),op(G)]; 4 3 3 2 2 J := [6400 x + 9, -320 x + 3 y, 800 x + 3 z, -12 y + 4 z , 17 y x + 6, 4 x y - 9 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 5/6, 1/2, 5/12, 5/12, 1/3, 6, 11, 16, 4, 4, 2, 2, 5/6, 2/3, 1/3, 1/2, 1/3, 1/6, 1, -4, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=334.2MB, alloc=108.3MB, time=7.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243801 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-9 + 7 y, -17 x + 7 y, 20 x z + y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 2 G := [16 y + 17 z , 18 x - 9 x y, 5 y + 16 z ] > Problem := [F,G]; 2 Problem := [[-9 + 7 y, -17 x + 7 y, 20 x z + y ], 2 2 2 2 2 [16 y + 17 z , 18 x - 9 x y, 5 y + 16 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.50 memory used=48.2MB, alloc=32.3MB, time=0.84 N1 := 157 > GB := Basis(F, plex(op(vars))); GB := [17 x - 9, 7 y - 9, 980 z + 153] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=69.0MB, alloc=32.3MB, time=1.20 memory used=89.2MB, alloc=32.3MB, time=1.49 N2 := 149 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [7 y - 9, -17 x + 7 y, 20 z x + y , 17 z + 16 y , 18 x - 9 x y, 2 2 16 z + 5 y ] > J:=[op(GB),op(G)]; J := [ 2 2 2 2 2 17 x - 9, 7 y - 9, 980 z + 153, 17 z + 16 y , 18 x - 9 x y, 16 z + 5 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 2, 2, 1/2, 1, 1/2, 1/3, 1/2, 1/4, 6, 9, 9, 2, 2, 2, 2, 1/3, 2/3, 1/2, 1/4, 1/3, 1/4, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=107.7MB, alloc=32.3MB, time=1.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243805 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [8 z - 10 x, -16 x y + 9 z , 18 x - 2 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [8 y z + 16 z , -10 x + 20 z, 3 x z - 16 y z] > Problem := [F,G]; 2 2 2 2 Problem := [[8 z - 10 x, -16 x y + 9 z , 18 x - 2 y ], 2 [8 y z + 16 z , -10 x + 20 z, 3 x z - 16 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=48.0MB, alloc=32.3MB, time=0.80 memory used=68.5MB, alloc=56.3MB, time=1.12 memory used=108.5MB, alloc=60.3MB, time=1.72 memory used=147.0MB, alloc=84.3MB, time=2.45 memory used=204.3MB, alloc=108.3MB, time=3.49 memory used=279.4MB, alloc=140.3MB, time=4.87 memory used=362.3MB, alloc=164.3MB, time=6.94 memory used=453.4MB, alloc=188.3MB, time=10.20 memory used=563.1MB, alloc=188.3MB, time=14.34 memory used=672.8MB, alloc=212.3MB, time=18.49 memory used=806.6MB, alloc=212.3MB, time=23.52 N1 := 4413 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [4096 x - 225 x, 64 x y - 45 x, -9 x + y , 4 z - 5 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=942.8MB, alloc=212.3MB, time=27.91 memory used=1084.0MB, alloc=492.3MB, time=30.40 memory used=1248.0MB, alloc=516.3MB, time=36.36 N2 := 2575 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [8 z - 10 x, -16 x y + 9 z , 18 x - 2 y , 8 y z + 16 z , -10 x + 20 z, 3 x z - 16 y z] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [4096 x - 225 x, 64 x y - 45 x, -9 x + y , 4 z - 5 x, 8 y z + 16 z , -10 x + 20 z, 3 x z - 16 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 2, 2, 5/6, 2/3, 5/6, 5/12, 1/3, 7/12, 7, 14, 14, 3, 3, 2, 2, 6/7, 4/7, 4/7, 4/7, 2/7, 3/7, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1318.6MB, alloc=516.3MB, time=38.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243910 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [20 x z - 15 y, -10 y z - 6 z , 8 y z - 1] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-4 x - 15, 13 y z, -18 x z] > Problem := [F,G]; Problem := 2 2 [[20 x z - 15 y, -10 y z - 6 z , 8 y z - 1], [-4 x - 15, 13 y z, -18 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 129 > GB := Basis(F, plex(op(vars))); 2 GB := [20 x + 9, 40 y + 3, 3 z + 5 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=26.8MB, alloc=32.3MB, time=0.54 N2 := 65 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 x z - 15 y, -10 y z - 6 z , 8 z y - 1, -4 x - 15, 13 z y, -18 z x] > J:=[op(GB),op(G)]; 2 2 J := [20 x + 9, 40 y + 3, 3 z + 5 y, -4 x - 15, 13 z y, -18 z x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 1/2, 2/3, 5/6, 3/14, 2/7, 3/7, 6, 9, 10, 2, 2, 2, 1, 1/2, 1/2, 1/2, 3/14, 3/14, 3/14, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=39.3MB, alloc=32.3MB, time=0.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243912 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 x y + 10 z , -10 x y + 13 y, 7 x - 3 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [14 - 20 x, -16 x y + 18 z, 20 + 8 y] > Problem := [F,G]; 2 2 Problem := [[-3 x y + 10 z , -10 x y + 13 y, 7 x - 3 x], [14 - 20 x, -16 x y + 18 z, 20 + 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.52 memory used=48.8MB, alloc=56.3MB, time=0.94 N1 := 335 > GB := Basis(F, plex(op(vars))); 2 2 GB := [7 x - 3 x, y, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 153 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-3 x y + 10 z , -10 x y + 13 y, 7 x - 3 x, 14 - 20 x, -16 x y + 18 z, 20 + 8 y] > J:=[op(GB),op(G)]; 2 2 J := [7 x - 3 x, y, z , 14 - 20 x, -16 x y + 18 z, 20 + 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 1, 2, 5/6, 2/3, 1/3, 1/2, 5/12, 1/6, 6, 8, 9, 2, 2, 1, 2, 1/2, 1/2, 1/3, 4/11, 3/11, 2/11, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=68.9MB, alloc=56.3MB, time=1.25 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243916 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-11 x + z, 19 y + 2 z, 3 x - 11 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [12 x + 17 y z, -10 x - 18 x, 4 x y + 6 y] > Problem := [F,G]; 2 2 Problem := [[-11 x + z, 19 y + 2 z, 3 x - 11 x z], 2 2 [12 x + 17 y z, -10 x - 18 x, 4 x y + 6 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=79.4MB, alloc=68.3MB, time=1.38 memory used=128.9MB, alloc=68.3MB, time=2.22 memory used=170.9MB, alloc=92.3MB, time=3.15 memory used=226.6MB, alloc=116.3MB, time=5.15 N1 := 1763 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , 19 y + 22 x, -11 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 307 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-11 x + z, 19 y + 2 z, 3 x - 11 x z, 17 z y + 12 x , -10 x - 18 x, 4 x y + 6 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x , 19 y + 22 x, -11 x + z, 17 z y + 12 x , -10 x - 18 x, 4 x y + 6 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 5/6, 1/2, 2/3, 7/12, 1/3, 1/3, 6, 11, 11, 2, 2, 2, 1, 1, 1/2, 1/3, 7/12, 1/3, 1/6, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=301.2MB, alloc=116.3MB, time=6.98 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428243935 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [4 x z - 15 y, -7 y - 18 z, -11 x y - 6] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [12 x - 16 x z, 14 x - 7 z , 4 x + x y] > Problem := [F,G]; 2 Problem := [[4 x z - 15 y, -7 y - 18 z, -11 x y - 6], 2 2 2 2 [12 x - 16 x z, 14 x - 7 z , 4 x + x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.80 memory used=68.3MB, alloc=32.3MB, time=1.10 memory used=88.1MB, alloc=56.3MB, time=1.41 memory used=128.2MB, alloc=60.3MB, time=1.99 memory used=167.0MB, alloc=84.3MB, time=2.62 memory used=222.3MB, alloc=84.3MB, time=3.63 memory used=277.1MB, alloc=108.3MB, time=4.62 memory used=350.3MB, alloc=140.3MB, time=5.98 memory used=440.1MB, alloc=164.3MB, time=7.62 memory used=546.7MB, alloc=188.3MB, time=9.54 memory used=664.3MB, alloc=212.3MB, time=11.73 memory used=786.7MB, alloc=236.3MB, time=15.21 memory used=917.3MB, alloc=260.3MB, time=19.36 memory used=1061.3MB, alloc=284.3MB, time=24.25 memory used=1216.1MB, alloc=308.3MB, time=30.40 memory used=1393.4MB, alloc=332.3MB, time=37.48 memory used=1594.7MB, alloc=332.3MB, time=45.51 memory used=1796.0MB, alloc=356.3MB, time=53.54 memory used=2021.2MB, alloc=356.3MB, time=62.46 memory used=2246.4MB, alloc=356.3MB, time=71.38 memory used=2471.6MB, alloc=356.3MB, time=80.34 memory used=2696.7MB, alloc=380.3MB, time=89.30 memory used=2945.7MB, alloc=380.3MB, time=99.13 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244235 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [4 x y - 12 z , x - 2 y z, 19 x + 20 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-12 x - 5 y z, -13 x z - 16 z , -17 y z + 7 z ] > Problem := [F,G]; 2 2 2 2 Problem := [[4 x y - 12 z , x - 2 y z, 19 x + 20 z ], 2 2 2 [-12 x - 5 y z, -13 x z - 16 z , -17 y z + 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.49 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=68.6MB, alloc=56.3MB, time=1.18 N1 := 575 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 2 GB := [x , 57 x + 20 x y, z x , -x + 2 y z, 20 z + 19 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=109.8MB, alloc=60.3MB, time=1.98 memory used=148.7MB, alloc=84.3MB, time=2.62 N2 := 311 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [4 x y - 12 z , -2 z y + x , 20 z + 19 x , -12 x - 5 y z, 2 2 -13 x z - 16 z , -17 y z + 7 z ] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 2 J := [x , 57 x + 20 x y, z x , -x + 2 y z, 20 z + 19 x , -12 x - 5 y z, 2 2 -13 x z - 16 z , -17 y z + 7 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 1, 2, 5/6, 2/3, 1, 5/12, 1/3, 2/3, 8, 17, 18, 3, 3, 1, 2, 7/8, 1/2, 3/4, 1/2, 1/4, 1/2, -2, -6, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=152.4MB, alloc=84.3MB, time=2.72 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244243 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 x y - 9 y, 20 x , x y + 9 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-13 x y - 20 y z, 4 x y + 12 y z, 16 x] > Problem := [F,G]; 2 Problem := [[-12 x y - 9 y, 20 x , x y + 9 x z], [-13 x y - 20 y z, 4 x y + 12 y z, 16 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 N1 := 193 > GB := Basis(F, plex(op(vars))); 2 GB := [x , y, x z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=27.2MB, alloc=32.3MB, time=0.56 N2 := 51 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 [-12 x y - 9 y, 20 x , x y + 9 x z, -13 x y - 20 y z, 4 x y + 12 y z, 16 x] > J:=[op(GB),op(G)]; 2 J := [x , y, x z, -13 x y - 20 y z, 4 x y + 12 y z, 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 1, 1, 2/3, 1/2, 7/12, 7/12, 1/4, 6, 11, 10, 2, 2, 1, 1, 5/6, 1/2, 1/2, 5/11, 5/11, 3/11, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=31.9MB, alloc=32.3MB, time=0.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244245 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-7 x - 19, 13 - 7 y, 12 x + 14 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-x z - 7 y z, -5 x z + 10, 4 x z + 13] > Problem := [F,G]; 2 2 Problem := [[-7 x - 19, 13 - 7 y, 12 x + 14 x y], [-x z - 7 y z, -5 x z + 10, 4 x z + 13]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.50 N1 := 281 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.9MB, alloc=32.3MB, time=0.87 N2 := 51 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := [ 2 2 -7 x - 19, 13 - 7 y, 12 x + 14 x y, -x z - 7 y z, -5 x z + 10, 4 z x + 13 ] > J:=[op(GB),op(G)]; J := [1, -x z - 7 y z, -5 x z + 10, 4 z x + 13] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 1, 5/6, 1/2, 1/2, 1/2, 1/4, 1/3, 4, 7, 6, 2, 1, 1, 1, 3/4, 1/4, 3/4, 3/7, 1/7, 4/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=49.8MB, alloc=32.3MB, time=0.90 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244247 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [14 y - 13 y, 13 x y + 2, 5 z + 17 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-12 + 7 z, -13 x + 9 y, -9 y + 9 z ] > Problem := [F,G]; 2 2 Problem := [[14 y - 13 y, 13 x y + 2, 5 z + 17 y], 2 2 2 [-12 + 7 z, -13 x + 9 y, -9 y + 9 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=46.9MB, alloc=32.3MB, time=0.75 memory used=67.1MB, alloc=32.3MB, time=1.03 memory used=86.6MB, alloc=32.3MB, time=1.30 memory used=105.1MB, alloc=56.3MB, time=1.58 memory used=147.3MB, alloc=60.3MB, time=2.35 memory used=183.5MB, alloc=84.3MB, time=2.99 memory used=238.8MB, alloc=108.3MB, time=3.98 memory used=308.8MB, alloc=132.3MB, time=5.72 memory used=389.5MB, alloc=132.3MB, time=8.60 memory used=468.7MB, alloc=156.3MB, time=11.54 N1 := 3001 > GB := Basis(F, plex(op(vars))); 2 GB := [169 x + 28, 14 y - 13, 70 z + 221] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=573.6MB, alloc=156.3MB, time=14.96 N2 := 853 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 14 y - 13 y, 13 y x + 2, 5 z + 17 y, 7 z - 12, -13 x + 9 y, -9 y + 9 z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [169 x + 28, 14 y - 13, 70 z + 221, 7 z - 12, -13 x + 9 y, -9 y + 9 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 1/3, 5/6, 1/2, 1/6, 1/2, 1/4, 6, 8, 9, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/6, 1/4, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=682.0MB, alloc=164.3MB, time=17.15 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244299 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-10 y z + 17 x, 13 y z + 20 z, -11 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-18 x, 4 x + 13 y , -5 y - 14 x] > Problem := [F,G]; Problem := [ 2 2 2 [-10 y z + 17 x, 13 y z + 20 z, -11 y], [-18 x, 4 x + 13 y , -5 y - 14 x] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.52 N1 := 203 > GB := Basis(F, plex(op(vars))); GB := [x, y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 57 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-10 z y + 17 x, 13 y z + 20 z, -11 y, -18 x, 13 y + 4 x , -5 y - 14 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x, y, z, -18 x, 13 y + 4 x , -5 y - 14 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 1, 2/3, 5/6, 1/3, 1/3, 5/12, 1/4, 6, 8, 8, 2, 2, 2, 1, 2/3, 1/2, 1/6, 4/9, 1/3, 1/9, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=45.4MB, alloc=32.3MB, time=0.81 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244302 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-15 x z + 20 z, 17 x z - 6 y z, -5 z - 17 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [16 x + 13 x y, x + 19 z, 7 z + 4 y] > Problem := [F,G]; 2 Problem := [[-15 x z + 20 z, 17 x z - 6 y z, -5 z - 17 y], 2 2 2 [16 x + 13 x y, x + 19 z, 7 z + 4 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=48.6MB, alloc=32.3MB, time=0.82 memory used=70.3MB, alloc=56.3MB, time=1.22 memory used=112.4MB, alloc=84.3MB, time=2.04 N1 := 1197 > GB := Basis(F, plex(op(vars))); 2 2 GB := [3 x y - 4 y, 9 y - 34 y, 3 x z - 4 z, 9 y z - 34 z, 5 z + 17 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=169.2MB, alloc=84.3MB, time=3.72 memory used=228.3MB, alloc=84.3MB, time=4.66 memory used=287.5MB, alloc=108.3MB, time=6.18 N2 := 983 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-15 x z + 20 z, 17 x z - 6 y z, -5 z - 17 y, 16 x + 13 x y, x + 19 z, 2 7 z + 4 y] > J:=[op(GB),op(G)]; 2 2 J := [3 x y - 4 y, 9 y - 34 y, 3 x z - 4 z, 9 y z - 34 z, 5 z + 17 y, 2 2 2 16 x + 13 x y, x + 19 z, 7 z + 4 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 1, 2, 2/3, 2/3, 5/6, 5/12, 1/3, 7/12, 8, 15, 16, 2, 2, 2, 2, 1/2, 3/4, 5/8, 5/16, 1/2, 7/16, -2, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=292.5MB, alloc=108.3MB, time=6.32 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244321 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [10 x y + 12 z , -20 x z - 1, 5 x + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [16 + 16 z, x z - 11 z , -2 x y - 4 y] > Problem := [F,G]; 2 2 Problem := [[10 x y + 12 z , -20 x z - 1, 5 x + 19 y], 2 [16 + 16 z, x z - 11 z , -2 x y - 4 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=68.3MB, alloc=56.3MB, time=1.13 memory used=111.0MB, alloc=60.3MB, time=1.92 memory used=149.7MB, alloc=84.3MB, time=2.60 memory used=205.1MB, alloc=108.3MB, time=3.72 memory used=271.8MB, alloc=132.3MB, time=5.91 memory used=357.6MB, alloc=132.3MB, time=9.01 N1 := 2515 > GB := Basis(F, plex(op(vars))); 5 2 4 GB := [5000 x - 57, 5 x + 19 y, 250 x + 57 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=446.6MB, alloc=132.3MB, time=11.13 N2 := 605 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [10 x y + 12 z , -20 x z - 1, 5 x + 19 y, 16 + 16 z, x z - 11 z , -2 x y - 4 y] > J:=[op(GB),op(G)]; 5 2 4 2 J := [5000 x - 57, 5 x + 19 y, 250 x + 57 z, 16 + 16 z, x z - 11 z , -2 x y - 4 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 2, 5/6, 1/2, 2/3, 5/12, 1/3, 5/12, 6, 10, 16, 5, 5, 1, 2, 5/6, 1/3, 1/2, 5/12, 1/4, 1/3, 2, -5, -3] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=466.6MB, alloc=132.3MB, time=11.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244357 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [13 y + 15, -14 y - 18 z, -14 x z + 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-12 + 13 z, 1 + 6 y, x y - 20 y z] > Problem := [F,G]; 2 2 Problem := [[13 y + 15, -14 y - 18 z, -14 x z + 5 z], [-12 + 13 z, 1 + 6 y, x y - 20 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=48.9MB, alloc=32.3MB, time=0.86 memory used=67.8MB, alloc=56.3MB, time=1.29 N1 := 531 > GB := Basis(F, plex(op(vars))); 2 GB := [14 x - 5, 13 y + 15, 39 z - 35] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 225 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 13 y + 15, -14 y - 18 z, -14 x z + 5 z, 13 z - 12, 6 y + 1, x y - 20 y z] > J:=[op(GB),op(G)]; 2 J := [14 x - 5, 13 y + 15, 39 z - 35, 13 z - 12, 6 y + 1, x y - 20 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 1, 2, 1, 1/3, 2/3, 2/3, 1/6, 5/12, 5/12, 6, 8, 8, 2, 1, 2, 1, 1/3, 1/2, 1/2, 1/6, 1/3, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=94.5MB, alloc=56.3MB, time=1.70 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244362 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [15 x + 5 y , 9 y - 15 y, -3 x - 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [16 x z - 3 y , -15 - 7 y, -3 x y + 10 z] > Problem := [F,G]; 2 2 2 2 Problem := [[15 x + 5 y , 9 y - 15 y, -3 x - 2 z], 2 [16 x z - 3 y , -15 - 7 y, -3 x y + 10 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.79 memory used=67.7MB, alloc=32.3MB, time=1.08 memory used=87.2MB, alloc=56.3MB, time=1.42 memory used=128.0MB, alloc=60.3MB, time=2.12 memory used=164.7MB, alloc=84.3MB, time=2.77 memory used=219.6MB, alloc=108.3MB, time=4.48 N1 := 1453 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [27 x + 25 x , 9 x + 5 y, 3 x + 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=291.8MB, alloc=108.3MB, time=6.11 memory used=370.2MB, alloc=140.3MB, time=7.47 N2 := 1257 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [15 x + 5 y , 9 y - 15 y, -3 x - 2 z, 16 z x - 3 y , -15 - 7 y, -3 x y + 10 z] > J:=[op(GB),op(G)]; 4 2 2 2 2 J := [27 x + 25 x , 9 x + 5 y, 3 x + 2 z, 16 z x - 3 y , -15 - 7 y, -3 x y + 10 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 2/3, 5/6, 1/2, 1/3, 1/2, 1/4, 6, 12, 13, 4, 4, 2, 1, 5/6, 2/3, 1/2, 1/2, 1/3, 1/4, 0, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=446.3MB, alloc=140.3MB, time=9.78 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244392 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-17 x + 3 z, 5 x y - 13 x, -17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-14 x, 15 x y - 17, -6 x + 5 x y] > Problem := [F,G]; Problem := 2 2 [[-17 x + 3 z, 5 x y - 13 x, -17 z], [-14 x, 15 x y - 17, -6 x + 5 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.53 N1 := 325 > GB := Basis(F, plex(op(vars))); 2 GB := [x , 5 x y - 13 x, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.5MB, alloc=32.3MB, time=0.89 N2 := 201 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-17 x + 3 z, 5 x y - 13 x, -17 z, -14 x, 15 y x - 17, -6 x + 5 x y] > J:=[op(GB),op(G)]; 2 2 J := [x , 5 x y - 13 x, z, -14 x, 15 y x - 17, -6 x + 5 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 2, 1, 1, 5/6, 1/2, 1/3, 7/12, 1/4, 1/6, 6, 9, 10, 2, 2, 1, 1, 5/6, 1/2, 1/6, 7/11, 3/11, 1/11, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=62.2MB, alloc=32.3MB, time=1.12 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244396 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-2 x y + 13 z , 13 y - 13 z , -10 y - 6] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-8 x + 9, 14 x z + 20 z, 10 + 4 z] > Problem := [F,G]; 2 2 2 2 Problem := [[-2 x y + 13 z , 13 y - 13 z , -10 y - 6], 2 [-8 x + 9, 14 x z + 20 z, 10 + 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.47 memory used=48.0MB, alloc=32.3MB, time=0.77 memory used=69.5MB, alloc=56.3MB, time=1.15 memory used=111.4MB, alloc=84.3MB, time=1.89 memory used=169.5MB, alloc=84.3MB, time=3.61 N1 := 1311 > GB := Basis(F, plex(op(vars))); 2 2 GB := [20 x + 507, -2 x + 13 y, 5 z + 3] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-2 x y + 13 z , 13 y - 13 z , -10 y - 6, -8 x + 9, 14 x z + 20 z, 10 + 4 z] > J:=[op(GB),op(G)]; 2 2 2 J := [20 x + 507, -2 x + 13 y, 5 z + 3, -8 x + 9, 14 x z + 20 z, 10 + 4 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 1/2, 1/2, 2/3, 1/4, 1/4, 5/12, 6, 8, 10, 2, 2, 1, 2, 2/3, 1/6, 1/2, 1/3, 1/12, 1/3, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=193.3MB, alloc=84.3MB, time=4.07 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244408 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [4 z + 19 z, -5 x y - 19 y , 16 y z - 13 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [9 x + 3 z, -8 x y - 6 x, -15 y z - 6 x] > Problem := [F,G]; 2 2 Problem := [[4 z + 19 z, -5 x y - 19 y , 16 y z - 13 x], [9 x + 3 z, -8 x y - 6 x, -15 y z - 6 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.78 memory used=67.2MB, alloc=56.3MB, time=1.12 memory used=109.3MB, alloc=60.3MB, time=1.88 memory used=146.3MB, alloc=84.3MB, time=2.57 memory used=201.8MB, alloc=108.3MB, time=3.71 memory used=270.1MB, alloc=132.3MB, time=5.92 memory used=355.7MB, alloc=132.3MB, time=9.10 N1 := 2563 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x , y x, y , 4 x z + 19 x, 16 y z - 13 x, 4 z + 19 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=442.7MB, alloc=132.3MB, time=11.49 memory used=544.3MB, alloc=164.3MB, time=13.63 N2 := 1451 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [4 z + 19 z, -5 x y - 19 y , 16 y z - 13 x, 9 x + 3 z, -8 x y - 6 x, -15 y z - 6 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x , y x, y , 4 x z + 19 x, 16 y z - 13 x, 4 z + 19 z, 9 x + 3 z, -8 x y - 6 x, -15 y z - 6 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 2, 5/6, 2/3, 2/3, 1/2, 5/12, 5/12, 9, 17, 17, 2, 2, 2, 2, 7/9, 5/9, 5/9, 1/2, 5/18, 1/3, -4, -6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=594.3MB, alloc=164.3MB, time=15.36 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244457 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [9 x - 16 x z, -16 x - 6 z, -19 y - 8 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [16 x - 4 x, -6 x - 5, 4 y - 13 y] > Problem := [F,G]; 2 2 Problem := [[9 x - 16 x z, -16 x - 6 z, -19 y - 8 y z], 2 2 2 [16 x - 4 x, -6 x - 5, 4 y - 13 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.49 memory used=48.1MB, alloc=56.3MB, time=0.87 N1 := 467 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , -64 x y + 57 y , 3 z + 8 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [9 x - 16 x z, -16 x - 6 z, -19 y - 8 y z, 16 x - 4 x, -6 x - 5, 2 4 y - 13 y] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x , -64 x y + 57 y , 3 z + 8 x, 16 x - 4 x, -6 x - 5, 4 y - 13 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 1, 2/3, 1/3, 1/2, 1/2, 1/3, 1/4, 6, 8, 11, 2, 2, 2, 1, 5/6, 1/3, 1/6, 1/2, 1/3, 1/12, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=75.0MB, alloc=56.3MB, time=1.34 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244461 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [3 x + 11 x z, -17 y z + 7 x, -5 x z + 13 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-20 y + 20 y z, 9 x + 19 z, -8 x y + 12 x z] > Problem := [F,G]; 2 Problem := [[3 x + 11 x z, -17 y z + 7 x, -5 x z + 13 x], 2 [-20 y + 20 y z, 9 x + 19 z, -8 x y + 12 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=47.0MB, alloc=32.3MB, time=0.75 memory used=66.5MB, alloc=32.3MB, time=1.02 memory used=84.9MB, alloc=56.3MB, time=1.31 memory used=121.2MB, alloc=60.3MB, time=1.85 memory used=154.9MB, alloc=84.3MB, time=2.34 memory used=208.4MB, alloc=84.3MB, time=3.18 memory used=260.1MB, alloc=108.3MB, time=4.04 memory used=333.6MB, alloc=140.3MB, time=5.36 memory used=421.2MB, alloc=164.3MB, time=6.91 memory used=522.9MB, alloc=188.3MB, time=8.71 memory used=638.1MB, alloc=212.3MB, time=10.77 memory used=765.3MB, alloc=236.3MB, time=13.06 memory used=896.4MB, alloc=516.3MB, time=16.03 memory used=1028.4MB, alloc=540.3MB, time=20.03 memory used=1170.3MB, alloc=564.3MB, time=24.67 memory used=1325.2MB, alloc=588.3MB, time=29.98 memory used=1492.6MB, alloc=612.3MB, time=36.36 memory used=1676.6MB, alloc=636.3MB, time=43.85 memory used=1884.6MB, alloc=660.3MB, time=52.20 memory used=2116.6MB, alloc=684.3MB, time=61.53 memory used=2372.5MB, alloc=708.3MB, time=71.86 memory used=2652.3MB, alloc=708.3MB, time=82.91 memory used=2932.1MB, alloc=708.3MB, time=94.03 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244761 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [19 x z - 19 z, -10 y - 8 x, 8 x z + 6] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-12 z , -6 x - 17, -12 x] > Problem := [F,G]; Problem := 2 2 2 [[19 x z - 19 z, -10 y - 8 x, 8 x z + 6], [-12 z , -6 x - 17, -12 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 49 > GB := Basis(F, plex(op(vars))); 2 GB := [x - 1, 5 y + 4, 4 z + 3] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 25 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [19 x z - 19 z, -10 y - 8 x, 8 x z + 6, -12 z , -6 x - 17, -12 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x - 1, 5 y + 4, 4 z + 3, -12 z , -6 x - 17, -12 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 5/6, 1/6, 1/2, 5/12, 1/12, 1/3, 6, 6, 9, 2, 2, 2, 2, 1/2, 1/6, 1/3, 1/4, 1/12, 1/6, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=21.6MB, alloc=32.3MB, time=0.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428244762 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-2 y + 19 y z, 3 x z + 19, -7 x z + 19 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [18 y z + 4 x, -18 y z - 8 x, 4 x z - 18 z ] > Problem := [F,G]; 2 2 Problem := [[-2 y + 19 y z, 3 x z + 19, -7 x z + 19 y ], 2 [18 y z + 4 x, -18 y z - 8 x, 4 x z - 18 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.79 memory used=67.8MB, alloc=56.3MB, time=1.10 memory used=106.7MB, alloc=60.3MB, time=1.68 memory used=142.1MB, alloc=84.3MB, time=2.23 memory used=198.5MB, alloc=84.3MB, time=3.09 memory used=252.3MB, alloc=108.3MB, time=3.92 memory used=327.7MB, alloc=116.3MB, time=5.08 memory used=402.7MB, alloc=140.3MB, time=6.26 memory used=498.3MB, alloc=140.3MB, time=7.76 memory used=590.0MB, alloc=164.3MB, time=9.25 memory used=691.5MB, alloc=188.3MB, time=10.89 memory used=789.2MB, alloc=444.3MB, time=12.56 memory used=912.9MB, alloc=468.3MB, time=14.63 memory used=1063.7MB, alloc=492.3MB, time=17.42 memory used=1224.3MB, alloc=516.3MB, time=20.29 memory used=1391.9MB, alloc=540.3MB, time=23.41 memory used=1567.8MB, alloc=564.3MB, time=26.74 memory used=1751.8MB, alloc=588.3MB, time=30.25 memory used=1943.1MB, alloc=612.3MB, time=33.93 memory used=2148.9MB, alloc=636.3MB, time=37.82 memory used=2355.1MB, alloc=660.3MB, time=41.89 memory used=2570.9MB, alloc=684.3MB, time=46.15 memory used=2780.8MB, alloc=708.3MB, time=52.09 memory used=2977.7MB, alloc=732.3MB, time=59.00 memory used=3181.4MB, alloc=756.3MB, time=66.64 memory used=3396.2MB, alloc=780.3MB, time=75.12 memory used=3623.4MB, alloc=804.3MB, time=84.17 memory used=3863.1MB, alloc=828.3MB, time=93.86 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245062 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [5 + 11 z, -12 x y - 20 x z, -6 y - 14 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [6 y z - 13 z, -12 y z - 4 x, 5 - 13 z] > Problem := [F,G]; 2 Problem := [[5 + 11 z, -12 x y - 20 x z, -6 y - 14 y], [6 y z - 13 z, -12 y z - 4 x, 5 - 13 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=46.5MB, alloc=32.3MB, time=0.74 memory used=66.5MB, alloc=56.3MB, time=1.10 memory used=106.5MB, alloc=60.3MB, time=1.79 memory used=141.9MB, alloc=84.3MB, time=2.40 memory used=195.7MB, alloc=108.3MB, time=3.36 memory used=263.8MB, alloc=132.3MB, time=5.05 memory used=342.8MB, alloc=156.3MB, time=7.85 memory used=443.5MB, alloc=156.3MB, time=11.59 memory used=544.1MB, alloc=180.3MB, time=15.32 N1 := 3413 > GB := Basis(F, plex(op(vars))); 2 GB := [x, 3 y + 7 y, 11 z + 5] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=670.2MB, alloc=188.3MB, time=18.44 N2 := 907 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [11 z + 5, -12 x y - 20 x z, -6 y - 14 y, 6 y z - 13 z, -12 y z - 4 x, 5 - 13 z] > J:=[op(GB),op(G)]; 2 J := [x, 3 y + 7 y, 11 z + 5, 6 y z - 13 z, -12 y z - 4 x, 5 - 13 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 1, 2, 1, 1/3, 2/3, 5/6, 1/4, 5/12, 1/2, 6, 9, 9, 2, 1, 2, 1, 1/3, 1/2, 2/3, 2/11, 4/11, 5/11, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=686.6MB, alloc=188.3MB, time=18.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245132 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-7 y - 13 z , 15 x y + 9 z , 9 z + 2 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [13 y z + 15, 8 x + 14 y z, 16 x - 16 x z] > Problem := [F,G]; 2 2 2 2 Problem := [[-7 y - 13 z , 15 x y + 9 z , 9 z + 2 y], 2 2 [13 y z + 15, 8 x + 14 y z, 16 x - 16 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.0MB, alloc=32.3MB, time=0.50 memory used=48.5MB, alloc=32.3MB, time=0.80 memory used=68.4MB, alloc=32.3MB, time=1.09 memory used=87.5MB, alloc=56.3MB, time=1.39 memory used=127.0MB, alloc=60.3MB, time=1.96 memory used=165.0MB, alloc=60.3MB, time=2.50 memory used=201.5MB, alloc=84.3MB, time=3.06 memory used=257.9MB, alloc=84.3MB, time=3.90 memory used=310.8MB, alloc=116.3MB, time=4.74 memory used=389.1MB, alloc=116.3MB, time=5.89 memory used=466.2MB, alloc=140.3MB, time=7.03 memory used=551.7MB, alloc=140.3MB, time=8.34 memory used=632.5MB, alloc=396.3MB, time=9.59 memory used=730.9MB, alloc=420.3MB, time=11.07 memory used=847.8MB, alloc=444.3MB, time=12.89 memory used=986.6MB, alloc=468.3MB, time=15.05 memory used=1139.9MB, alloc=492.3MB, time=17.49 memory used=1267.4MB, alloc=492.3MB, time=19.51 memory used=1404.1MB, alloc=516.3MB, time=21.80 memory used=1526.4MB, alloc=540.3MB, time=23.90 memory used=1621.4MB, alloc=540.3MB, time=25.55 memory used=1708.9MB, alloc=540.3MB, time=27.14 memory used=1791.0MB, alloc=540.3MB, time=28.63 memory used=1898.6MB, alloc=564.3MB, time=30.80 memory used=2026.3MB, alloc=588.3MB, time=33.48 memory used=2149.0MB, alloc=588.3MB, time=36.09 memory used=2269.4MB, alloc=612.3MB, time=38.72 memory used=2397.3MB, alloc=636.3MB, time=41.44 memory used=2484.4MB, alloc=660.3MB, time=43.46 memory used=2600.9MB, alloc=684.3MB, time=46.05 memory used=2702.4MB, alloc=708.3MB, time=48.34 memory used=2863.0MB, alloc=732.3MB, time=53.63 memory used=3149.1MB, alloc=756.3MB, time=63.76 memory used=3435.2MB, alloc=780.3MB, time=74.78 memory used=3717.4MB, alloc=804.3MB, time=87.41 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245432 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 x z + 2, 7 x + 6 y, 16 y + 20 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 x + 14 x, -2 y + 7 z, 14 x - 6 x y] > Problem := [F,G]; 2 Problem := [[-8 x z + 2, 7 x + 6 y, 16 y + 20 x], 2 2 [11 x + 14 x, -2 y + 7 z, 14 x - 6 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=48.6MB, alloc=32.3MB, time=0.87 memory used=67.9MB, alloc=56.3MB, time=1.21 N1 := 641 > GB := Basis(F, plex(op(vars))); GB := [49 x + 45, 14 y - 15, 180 z + 49] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=107.2MB, alloc=56.3MB, time=2.03 N2 := 343 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-8 x z + 2, 6 y + 7 x, 16 y + 20 x, 11 x + 14 x, -2 y + 7 z, 2 14 x - 6 x y] > J:=[op(GB),op(G)]; J := 2 2 [49 x + 45, 14 y - 15, 180 z + 49, 11 x + 14 x, -2 y + 7 z, 14 x - 6 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 1, 5/6, 2/3, 1/3, 7/12, 1/3, 1/6, 6, 8, 8, 2, 2, 1, 1, 1/2, 1/2, 1/3, 5/12, 1/4, 1/6, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=130.4MB, alloc=56.3MB, time=2.44 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245439 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 y + 11 z, -3 x + 15 z, x z - 6 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-15 x + 17 z, -11 x + 17 z, 18 - 9 x] > Problem := [F,G]; 2 2 Problem := [[19 y + 11 z, -3 x + 15 z, x z - 6 y ], 2 [-15 x + 17 z, -11 x + 17 z, 18 - 9 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.79 memory used=67.2MB, alloc=56.3MB, time=1.09 memory used=106.8MB, alloc=60.3MB, time=1.69 memory used=147.0MB, alloc=84.3MB, time=2.37 memory used=205.3MB, alloc=108.3MB, time=3.38 memory used=281.3MB, alloc=132.3MB, time=4.72 memory used=373.4MB, alloc=164.3MB, time=6.36 memory used=476.9MB, alloc=188.3MB, time=8.80 memory used=585.3MB, alloc=212.3MB, time=12.01 memory used=702.5MB, alloc=236.3MB, time=16.47 memory used=843.6MB, alloc=236.3MB, time=21.80 memory used=984.7MB, alloc=260.3MB, time=27.16 memory used=1149.8MB, alloc=260.3MB, time=33.40 memory used=1314.8MB, alloc=284.3MB, time=39.67 N1 := 5633 > GB := Basis(F, plex(op(vars))); 4 3 2 2 GB := [726 x - 1805 x , 11 x + 95 y, -x + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 207 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [11 z + 19 y, -3 x + 15 z, z x - 6 y , -15 x + 17 z, -11 x + 17 z, 18 - 9 x] > J:=[op(GB),op(G)]; 4 3 2 2 2 J := [726 x - 1805 x , 11 x + 95 y, -x + 5 z, -15 x + 17 z, -11 x + 17 z, 18 - 9 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 2, 2, 1, 5/6, 1/3, 5/6, 5/12, 1/6, 5/12, 6, 10, 12, 4, 4, 1, 1, 1, 1/6, 1/2, 7/12, 1/12, 1/4, 2, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1466.7MB, alloc=284.3MB, time=44.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245579 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [16 x z - 16 y , -3 y, -10 y + 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [13 x z - 6 y, 4 y z + 18 z, 12 x z + 9] > Problem := [F,G]; 2 Problem := [[16 x z - 16 y , -3 y, -10 y + 20 z], [13 x z - 6 y, 4 y z + 18 z, 12 x z + 9]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.5MB, alloc=32.3MB, time=0.81 memory used=67.3MB, alloc=56.3MB, time=1.16 memory used=107.6MB, alloc=84.3MB, time=1.88 N1 := 1169 > GB := Basis(F, plex(op(vars))); GB := [y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=166.3MB, alloc=84.3MB, time=3.49 N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 16 x z - 16 y , -3 y, -10 y + 20 z, 13 z x - 6 y, 4 y z + 18 z, 12 x z + 9] > J:=[op(GB),op(G)]; J := [y, z, 13 z x - 6 y, 4 y z + 18 z, 12 x z + 9] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 10, 2, 1, 2, 1, 1/2, 5/6, 5/6, 1/4, 5/12, 1/2, 5, 9, 8, 2, 1, 1, 1, 2/5, 3/5, 4/5, 1/4, 3/8, 5/8, 4, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=169.6MB, alloc=84.3MB, time=3.56 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245590 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [7 x y + 3, 18 x + 15 z, 14 z - 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-3 x + 17 y z, 13 x z + 8 y z, -17 x z - 18 y ] > Problem := [F,G]; 2 2 Problem := [[7 x y + 3, 18 x + 15 z, 14 z - 20 z], 2 2 [-3 x + 17 y z, 13 x z + 8 y z, -17 x z - 18 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.80 memory used=67.9MB, alloc=32.3MB, time=1.09 memory used=87.1MB, alloc=56.3MB, time=1.39 memory used=126.1MB, alloc=60.3MB, time=1.96 memory used=163.2MB, alloc=84.3MB, time=2.54 memory used=221.1MB, alloc=84.3MB, time=3.56 memory used=273.2MB, alloc=108.3MB, time=4.49 memory used=345.1MB, alloc=140.3MB, time=5.75 memory used=432.2MB, alloc=164.3MB, time=7.27 memory used=530.3MB, alloc=188.3MB, time=9.79 memory used=636.4MB, alloc=212.3MB, time=13.20 memory used=754.9MB, alloc=236.3MB, time=17.75 memory used=897.4MB, alloc=236.3MB, time=23.33 memory used=1039.8MB, alloc=260.3MB, time=28.85 memory used=1206.3MB, alloc=260.3MB, time=35.17 memory used=1372.7MB, alloc=284.3MB, time=41.50 N1 := 5505 > GB := Basis(F, plex(op(vars))); 2 GB := [21 x + 25, 25 y - 9 x, 7 z - 10] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1509.5MB, alloc=284.3MB, time=45.02 N2 := 1289 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [7 y x + 3, 18 x + 15 z, 14 z - 20 z, -3 x + 17 y z, 13 x z + 8 y z, 2 -17 x z - 18 y ] > J:=[op(GB),op(G)]; 2 2 J := [21 x + 25, 25 y - 9 x, 7 z - 10, -3 x + 17 y z, 13 x z + 8 y z, 2 -17 x z - 18 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 2/3, 5/6, 5/12, 1/3, 7/12, 6, 13, 10, 2, 2, 2, 1, 5/6, 2/3, 2/3, 5/12, 1/3, 5/12, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1614.3MB, alloc=540.3MB, time=47.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245760 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [4 x - 15 y, 17 + 8 x, -5 y - 8 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-6 z - 15 z, 18 + 9 z, 4 y - 14 z] > Problem := [F,G]; Problem := [ 2 2 2 [4 x - 15 y, 17 + 8 x, -5 y - 8 z], [-6 z - 15 z, 18 + 9 z, 4 y - 14 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.3MB, alloc=32.3MB, time=0.78 memory used=67.4MB, alloc=56.3MB, time=1.12 memory used=109.1MB, alloc=56.3MB, time=1.83 memory used=143.7MB, alloc=80.3MB, time=2.73 N1 := 1333 > GB := Basis(F, plex(op(vars))); GB := [8 x + 17, 240 y - 289, 384 z + 289] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=197.9MB, alloc=80.3MB, time=4.14 N2 := 159 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [4 x - 15 y, 8 x + 17, -5 y - 8 z, -6 z - 15 z, 18 + 9 z, 4 y - 14 z] > J:=[op(GB),op(G)]; 2 2 J := [8 x + 17, 240 y - 289, 384 z + 289, -6 z - 15 z, 18 + 9 z, 4 y - 14 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 9, 2, 2, 2, 2, 1/3, 1/2, 2/3, 1/6, 1/4, 5/12, 6, 7, 8, 2, 1, 2, 2, 1/6, 1/3, 2/3, 1/12, 1/6, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=201.3MB, alloc=80.3MB, time=4.21 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245778 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-9 y + 11 z , 16 x z + 16 y, -12 y + 6 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [19 z + 16 y, z + 2 y, -12 y z + 19 z] > Problem := [F,G]; 2 2 Problem := [[-9 y + 11 z , 16 x z + 16 y, -12 y + 6 z], 2 2 [19 z + 16 y, z + 2 y, -12 y z + 19 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.78 memory used=67.0MB, alloc=32.3MB, time=1.05 memory used=86.0MB, alloc=32.3MB, time=1.32 memory used=104.4MB, alloc=56.3MB, time=1.63 memory used=146.3MB, alloc=60.3MB, time=2.38 memory used=183.2MB, alloc=84.3MB, time=3.05 memory used=240.5MB, alloc=108.3MB, time=4.08 memory used=315.1MB, alloc=132.3MB, time=5.43 memory used=403.1MB, alloc=164.3MB, time=7.11 memory used=498.3MB, alloc=188.3MB, time=9.58 memory used=601.7MB, alloc=212.3MB, time=13.06 memory used=719.9MB, alloc=236.3MB, time=17.66 memory used=862.1MB, alloc=236.3MB, time=23.15 memory used=1004.3MB, alloc=236.3MB, time=28.63 memory used=1146.4MB, alloc=260.3MB, time=34.08 memory used=1312.5MB, alloc=260.3MB, time=40.39 memory used=1478.5MB, alloc=260.3MB, time=46.72 memory used=1644.8MB, alloc=284.3MB, time=53.02 N1 := 6445 > GB := Basis(F, plex(op(vars))); 2 GB := [2 x y + y, y , z - 2 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 237 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-9 y + 11 z , 16 x z + 16 y, -12 y + 6 z, 19 z + 16 y, z + 2 y, -12 y z + 19 z] > J:=[op(GB),op(G)]; 2 2 2 J := [2 x y + y, y , z - 2 y, 19 z + 16 y, z + 2 y, -12 y z + 19 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 2, 1/6, 1, 1, 1/12, 1/2, 7/12, 6, 11, 11, 2, 1, 2, 2, 1/6, 1, 2/3, 1/12, 7/12, 5/12, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1704.0MB, alloc=284.3MB, time=54.46 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245974 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [2 x z - 17 z , 11 y + 19 x, 16 z + 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [10 y - 10 z, 13 y z - 11 y, 11 x z + 17 z] > Problem := [F,G]; 2 2 2 Problem := [[2 x z - 17 z , 11 y + 19 x, 16 z + 5 z], [10 y - 10 z, 13 y z - 11 y, 11 x z + 17 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=47.7MB, alloc=32.3MB, time=0.81 memory used=67.7MB, alloc=56.3MB, time=1.18 memory used=108.2MB, alloc=80.3MB, time=1.89 memory used=165.3MB, alloc=80.3MB, time=3.60 N1 := 1673 > GB := Basis(F, plex(op(vars))); 2 2 GB := [11 y + 19 x, 32 x z + 85 z, 16 z + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=216.1MB, alloc=80.3MB, time=5.20 memory used=241.3MB, alloc=84.3MB, time=5.61 memory used=300.6MB, alloc=108.3MB, time=6.97 N2 := 915 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [2 x z - 17 z , 11 y + 19 x, 16 z + 5 z, 10 y - 10 z, 13 y z - 11 y, 11 x z + 17 z] > J:=[op(GB),op(G)]; 2 2 J := [11 y + 19 x, 32 x z + 85 z, 16 z + 5 z, 10 y - 10 z, 13 y z - 11 y, 11 x z + 17 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/3, 2/3, 6, 11, 11, 2, 1, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/3, 2/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=310.7MB, alloc=108.3MB, time=7.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428245998 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-12 x + 6 z, 20 y + 7 z , -3 y + 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [4 x z - 2, -20 y z + 8 z , -y z - x] > Problem := [F,G]; 2 2 2 2 Problem := [[-12 x + 6 z, 20 y + 7 z , -3 y + 5 y], 2 [4 x z - 2, -20 y z + 8 z , -y z - x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.49 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=67.7MB, alloc=32.3MB, time=1.07 memory used=86.8MB, alloc=56.3MB, time=1.38 memory used=125.8MB, alloc=60.3MB, time=1.98 memory used=162.1MB, alloc=84.3MB, time=2.55 memory used=217.8MB, alloc=84.3MB, time=3.39 memory used=270.8MB, alloc=108.3MB, time=4.22 memory used=345.6MB, alloc=140.3MB, time=5.61 memory used=436.0MB, alloc=164.3MB, time=7.25 memory used=539.3MB, alloc=188.3MB, time=9.63 memory used=644.1MB, alloc=212.3MB, time=13.47 memory used=768.9MB, alloc=236.3MB, time=18.26 N1 := 3435 > GB := Basis(F, plex(op(vars))); 8 4 4 2 GB := [63 x + 125 x , 21 x + 25 y, -2 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=922.6MB, alloc=236.3MB, time=22.90 memory used=1049.6MB, alloc=492.3MB, time=25.14 memory used=1224.2MB, alloc=516.3MB, time=30.65 N2 := 2559 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-12 x + 6 z, 7 z + 20 y , -3 y + 5 y, 4 x z - 2, -20 y z + 8 z , -y z - x] > J:=[op(GB),op(G)]; 8 4 4 2 2 J := [63 x + 125 x , 21 x + 25 y, -2 x + z, 4 x z - 2, -20 y z + 8 z , -y z - x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 2/3, 5/6, 1/4, 5/12, 1/2, 6, 12, 20, 8, 8, 1, 2, 5/6, 1/2, 2/3, 1/2, 1/4, 5/12, 0, -8, -6] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1329.7MB, alloc=516.3MB, time=34.65 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246102 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-16 - 14 x, -2 x - 9 y, -7 x y + 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-3 x z + 11 z, 8 x y - 9 y , 2 z - 9 z] > Problem := [F,G]; Problem := [[-16 - 14 x, -2 x - 9 y, -7 x y + 5 z], 2 2 [-3 x z + 11 z, 8 x y - 9 y , 2 z - 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=48.3MB, alloc=56.3MB, time=0.87 N1 := 577 > GB := Basis(F, plex(op(vars))); GB := [7 x + 8, 63 y - 16, 315 z + 128] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=88.8MB, alloc=60.3MB, time=1.63 N2 := 413 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-16 - 14 x, -2 x - 9 y, -7 x y + 5 z, -3 x z + 11 z, 8 x y - 9 y , 2 2 z - 9 z] > J:=[op(GB),op(G)]; 2 2 J := [7 x + 8, 63 y - 16, 315 z + 128, -3 x z + 11 z, 8 x y - 9 y , 2 z - 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 1, 2, 2, 5/6, 1/2, 1/2, 5/12, 1/3, 5/12, 6, 8, 9, 2, 1, 2, 2, 1/2, 1/3, 1/2, 1/4, 1/4, 5/12, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=113.8MB, alloc=60.3MB, time=2.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246108 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-3 y z + 10 x, -18 x y - 10 z, 7 y z + 17 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 x - z , -11 + 15 x, 16] > Problem := [F,G]; Problem := [ 2 2 [-3 y z + 10 x, -18 x y - 10 z, 7 y z + 17 x], [-9 x - z , -11 + 15 x, 16] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.0MB, alloc=32.3MB, time=0.53 N1 := 173 > GB := Basis(F, plex(op(vars))); GB := [x, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 15 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-3 z y + 10 x, -18 x y - 10 z, 7 z y + 17 x, -9 x - z , 15 x - 11, 16] > J:=[op(GB),op(G)]; 2 2 J := [x, z, -9 x - z , 15 x - 11, 16] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 2, 1, 2, 5/6, 1/2, 2/3, 5/11, 3/11, 4/11, 5, 5, 5, 2, 2, 0, 2, 3/5, 0, 2/5, 3/7, 0, 2/7, 7, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=41.0MB, alloc=32.3MB, time=0.76 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246110 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [11 y z, 14 y - 2 x, -18 x z - 4 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x y - 13 y z, -9 y z - 4, -2 z + 15] > Problem := [F,G]; 2 2 Problem := [[11 y z, 14 y - 2 x, -18 x z - 4 z ], 2 [-7 x y - 13 y z, -9 y z - 4, -2 z + 15]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=48.2MB, alloc=32.3MB, time=0.85 memory used=68.0MB, alloc=56.3MB, time=1.21 memory used=108.9MB, alloc=56.3MB, time=1.92 memory used=144.5MB, alloc=80.3MB, time=2.56 memory used=196.9MB, alloc=108.3MB, time=3.85 memory used=262.6MB, alloc=108.3MB, time=6.19 memory used=328.3MB, alloc=132.3MB, time=8.55 N1 := 2469 > GB := Basis(F, plex(op(vars))); 2 2 GB := [7 y - x, z x, z y, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=419.7MB, alloc=140.3MB, time=10.51 N2 := 1133 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [11 z y, 14 y - 2 x, -18 x z - 4 z , -7 x y - 13 y z, -9 y z - 4, 2 -2 z + 15] > J:=[op(GB),op(G)]; 2 2 2 J := [7 y - x, z x, z y, z , -7 x y - 13 y z, -9 y z - 4, -2 z + 15] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 1/2, 2/3, 5/6, 3/13, 5/13, 6/13, 7, 13, 14, 2, 1, 2, 2, 3/7, 4/7, 6/7, 3/14, 5/14, 3/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=477.9MB, alloc=140.3MB, time=12.19 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246147 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-8 x - 3 z , 15 z - 3, -x y + 15 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-8 x + 16 y z, -8 x - 3 x, -17 x - 10 y] > Problem := [F,G]; 2 2 2 2 Problem := [[-8 x - 3 z , 15 z - 3, -x y + 15 z ], 2 2 2 [-8 x + 16 y z, -8 x - 3 x, -17 x - 10 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.50 memory used=48.4MB, alloc=32.3MB, time=0.82 memory used=68.6MB, alloc=56.3MB, time=1.13 memory used=110.6MB, alloc=60.3MB, time=1.77 memory used=153.2MB, alloc=84.3MB, time=2.53 memory used=215.0MB, alloc=84.3MB, time=3.61 memory used=268.4MB, alloc=108.3MB, time=4.79 memory used=332.2MB, alloc=132.3MB, time=7.05 N1 := 2153 > GB := Basis(F, plex(op(vars))); 2 2 GB := [40 x + 3, y + 40 x, 5 z - 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=419.1MB, alloc=132.3MB, time=9.83 N2 := 687 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [-8 x - 3 z , 15 z - 3, -x y + 15 z , -8 x + 16 y z, -8 x - 3 x, 2 -17 x - 10 y] > J:=[op(GB),op(G)]; J := 2 2 2 2 2 [40 x + 3, y + 40 x, 5 z - 1, -8 x + 16 y z, -8 x - 3 x, -17 x - 10 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 5/6, 1/2, 2/3, 1/2, 1/4, 1/3, 6, 10, 11, 2, 2, 1, 2, 5/6, 1/2, 1/3, 1/2, 1/4, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=483.0MB, alloc=132.3MB, time=11.08 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246182 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [18 z - 20 z, 19 x y + 13 z , -4 y - 12 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [15 y z + 14 x, 16 y + 17, 13 x z - 7 z ] > Problem := [F,G]; 2 2 Problem := [[18 z - 20 z, 19 x y + 13 z , -4 y - 12 z], 2 2 [15 y z + 14 x, 16 y + 17, 13 x z - 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.0MB, alloc=32.3MB, time=0.77 memory used=66.8MB, alloc=32.3MB, time=1.06 memory used=84.9MB, alloc=56.3MB, time=1.35 memory used=123.2MB, alloc=60.3MB, time=1.91 memory used=157.9MB, alloc=84.3MB, time=2.45 memory used=213.0MB, alloc=84.3MB, time=3.27 memory used=265.9MB, alloc=116.3MB, time=4.11 memory used=338.4MB, alloc=140.3MB, time=5.25 memory used=432.7MB, alloc=164.3MB, time=6.95 memory used=541.2MB, alloc=188.3MB, time=8.90 memory used=665.3MB, alloc=212.3MB, time=11.14 memory used=785.8MB, alloc=492.3MB, time=13.37 memory used=930.6MB, alloc=516.3MB, time=16.18 memory used=1074.6MB, alloc=540.3MB, time=20.10 memory used=1218.6MB, alloc=564.3MB, time=24.70 memory used=1372.6MB, alloc=588.3MB, time=29.91 memory used=1538.7MB, alloc=612.3MB, time=36.06 memory used=1715.7MB, alloc=636.3MB, time=43.41 memory used=1916.7MB, alloc=660.3MB, time=51.77 memory used=2141.6MB, alloc=684.3MB, time=61.18 memory used=2390.5MB, alloc=708.3MB, time=71.46 memory used=2663.4MB, alloc=732.3MB, time=82.72 memory used=2960.1MB, alloc=732.3MB, time=94.83 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246482 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-7 x y - 10 y, -8 x - 19 y, -3 - 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [5 x y - 8 y z, -15 y z + 3 z , 7 z - 2 y] > Problem := [F,G]; Problem := [[-7 x y - 10 y, -8 x - 19 y, -3 - 16 x], 2 2 [5 x y - 8 y z, -15 y z + 3 z , 7 z - 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.47 memory used=48.0MB, alloc=32.3MB, time=0.80 memory used=68.1MB, alloc=56.3MB, time=1.17 memory used=108.8MB, alloc=84.3MB, time=1.92 memory used=165.0MB, alloc=108.3MB, time=3.65 N1 := 1283 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 443 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 H := [-7 x y - 10 y, -8 x - 19 y, -3 - 16 x, 5 x y - 8 y z, -15 y z + 3 z , 2 7 z - 2 y] > J:=[op(GB),op(G)]; 2 2 J := [1, 5 x y - 8 y z, -15 y z + 3 z , 7 z - 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 1, 2, 2/3, 5/6, 1/2, 1/3, 7/12, 1/3, 4, 7, 6, 2, 1, 1, 2, 1/4, 3/4, 3/4, 1/7, 4/7, 4/7, 5, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=210.0MB, alloc=108.3MB, time=4.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246497 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-11 y z + 1, -4 y - 12 y z, 12 x - 6 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 x y - 17 y , 13 z + 5, -7 y z - 5 z] > Problem := [F,G]; 2 2 Problem := [[-11 y z + 1, -4 y - 12 y z, 12 x - 6 y], 2 2 [11 x y - 17 y , 13 z + 5, -7 y z - 5 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.45 memory used=47.2MB, alloc=32.3MB, time=0.75 memory used=67.1MB, alloc=32.3MB, time=1.04 memory used=86.3MB, alloc=56.3MB, time=1.39 N1 := 357 > GB := Basis(F, plex(op(vars))); 4 2 2 GB := [44 x + 3, -2 x + y, 2 x + 3 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=124.1MB, alloc=60.3MB, time=1.99 N2 := 265 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-11 y z + 1, -4 y - 12 y z, 12 x - 6 y, 11 x y - 17 y , 13 z + 5, -7 y z - 5 z] > J:=[op(GB),op(G)]; J := 4 2 2 2 2 [44 x + 3, -2 x + y, 2 x + 3 z, 11 x y - 17 y , 13 z + 5, -7 y z - 5 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/3, 5/6, 2/3, 1/6, 7/12, 5/12, 6, 10, 14, 4, 4, 2, 2, 2/3, 1/2, 1/2, 1/3, 1/3, 1/3, 1, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=150.9MB, alloc=60.3MB, time=2.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246505 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [20 z - 6 z, -8 y z + 19 z, 10 x z + 9 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 z + 2, -6 x y + 7 y, -y z + z ] > Problem := [F,G]; 2 Problem := [[20 z - 6 z, -8 y z + 19 z, 10 x z + 9 y], 2 2 [16 z + 2, -6 x y + 7 y, -y z + z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=46.9MB, alloc=32.3MB, time=0.77 memory used=67.2MB, alloc=56.3MB, time=1.14 memory used=108.3MB, alloc=80.3MB, time=2.08 N1 := 729 > GB := Basis(F, plex(op(vars))); 2 GB := [8 x y + 57 y, 8 y - 19 y, -12 y + 95 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 z - 6 z, -8 y z + 19 z, 10 z x + 9 y, 16 z + 2, -6 x y + 7 y, 2 -y z + z ] > J:=[op(GB),op(G)]; J := [ 2 2 2 8 x y + 57 y, 8 y - 19 y, -12 y + 95 z, 16 z + 2, -6 x y + 7 y, -y z + z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 1, 1, 2, 1/3, 2/3, 5/6, 1/6, 5/12, 2/3, 6, 10, 11, 2, 1, 2, 2, 1/3, 5/6, 1/2, 1/6, 2/3, 1/3, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=135.3MB, alloc=80.3MB, time=2.48 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246512 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-13 x y - z, 9 x z + 7 x, -14 y + 7 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-11 y + 8 z , 3 x y + 19 z, -3 x + y z] > Problem := [F,G]; 2 2 Problem := [[-13 x y - z, 9 x z + 7 x, -14 y + 7 z ], 2 2 2 [-11 y + 8 z , 3 x y + 19 z, -3 x + y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.78 memory used=67.7MB, alloc=32.3MB, time=1.08 memory used=87.0MB, alloc=56.3MB, time=1.37 memory used=126.3MB, alloc=60.3MB, time=1.96 memory used=163.4MB, alloc=60.3MB, time=2.49 memory used=199.5MB, alloc=84.3MB, time=3.04 memory used=256.6MB, alloc=92.3MB, time=3.90 memory used=311.0MB, alloc=116.3MB, time=4.72 memory used=388.0MB, alloc=140.3MB, time=6.01 memory used=486.4MB, alloc=164.3MB, time=7.78 memory used=598.2MB, alloc=188.3MB, time=9.83 memory used=705.0MB, alloc=468.3MB, time=11.85 memory used=843.1MB, alloc=492.3MB, time=14.45 memory used=991.4MB, alloc=516.3MB, time=17.21 memory used=1150.2MB, alloc=540.3MB, time=20.24 memory used=1320.0MB, alloc=564.3MB, time=23.44 memory used=1494.4MB, alloc=588.3MB, time=26.77 memory used=1674.7MB, alloc=612.3MB, time=30.40 memory used=1853.9MB, alloc=636.3MB, time=34.74 memory used=2018.1MB, alloc=660.3MB, time=40.08 memory used=2188.3MB, alloc=684.3MB, time=46.14 memory used=2369.1MB, alloc=708.3MB, time=52.82 memory used=2562.1MB, alloc=732.3MB, time=60.33 memory used=2768.2MB, alloc=756.3MB, time=68.48 memory used=2987.4MB, alloc=780.3MB, time=77.57 memory used=3220.6MB, alloc=804.3MB, time=87.08 memory used=3468.3MB, alloc=828.3MB, time=97.35 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246812 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [15 x z - 16 z, 14 z, 6 z - 15 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-7 x z + 7 z , 20 y + z, -16 z - 16 z] > Problem := [F,G]; 2 Problem := [[15 x z - 16 z, 14 z, 6 z - 15 z], 2 2 [-7 x z + 7 z , 20 y + z, -16 z - 16 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.51 memory used=47.8MB, alloc=56.3MB, time=0.87 N1 := 717 > GB := Basis(F, plex(op(vars))); GB := [z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=87.7MB, alloc=56.3MB, time=1.68 N2 := 233 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [15 x z - 16 z, 14 z, 6 z - 15 z, -7 x z + 7 z , z + 20 y, -16 z - 16 z] > J:=[op(GB),op(G)]; 2 2 J := [z, -7 x z + 7 z , z + 20 y, -16 z - 16 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 1, 2, 1/3, 1/6, 1, 1/6, 1/12, 5/6, 4, 6, 6, 2, 1, 1, 2, 1/4, 1/4, 1, 1/7, 1/7, 6/7, 3, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=90.1MB, alloc=56.3MB, time=1.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246818 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [17 z - 10 z, -10 x y + 6 z , 15 x y + 11 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [20 z - 6, -x + 13, -12 y z - 9 z] > Problem := [F,G]; 2 2 Problem := [[17 z - 10 z, -10 x y + 6 z , 15 x y + 11 x z], 2 2 [20 z - 6, -x + 13, -12 y z - 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.3MB, alloc=32.3MB, time=0.76 memory used=67.0MB, alloc=32.3MB, time=1.04 memory used=87.1MB, alloc=56.3MB, time=1.42 memory used=128.0MB, alloc=60.3MB, time=2.14 memory used=163.4MB, alloc=84.3MB, time=2.77 memory used=217.7MB, alloc=108.3MB, time=3.75 memory used=286.7MB, alloc=132.3MB, time=5.07 memory used=365.9MB, alloc=164.3MB, time=7.16 memory used=456.0MB, alloc=188.3MB, time=10.12 memory used=562.4MB, alloc=188.3MB, time=14.10 memory used=668.7MB, alloc=212.3MB, time=18.08 memory used=799.0MB, alloc=212.3MB, time=22.94 memory used=929.2MB, alloc=212.3MB, time=27.76 memory used=1059.4MB, alloc=236.3MB, time=32.61 N1 := 5383 > GB := Basis(F, plex(op(vars))); 2 2 GB := [187 x y + 90 x y, 51 x y + 22 x y, -17 x y + 6 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1214.8MB, alloc=236.3MB, time=37.86 N2 := 1465 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [17 z - 10 z, -10 x y + 6 z , 15 x y + 11 x z, 20 z - 6, -x + 13, -12 y z - 9 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [187 x y + 90 x y, 51 x y + 22 x y, -17 x y + 6 z, 20 z - 6, -x + 13, -12 y z - 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 1/2, 1/2, 5/6, 1/3, 1/4, 7/12, 6, 11, 14, 3, 2, 2, 2, 2/3, 2/3, 1/2, 1/2, 1/2, 1/3, 0, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1367.1MB, alloc=236.3MB, time=41.91 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246937 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [9 z + 20 y, 7 x z - 19, -3 z - 17] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [x y + 6 y z, 19 x, -9 y - 3 x] > Problem := [F,G]; Problem := 2 2 2 [[9 z + 20 y, 7 x z - 19, -3 z - 17], [x y + 6 y z, 19 x, -9 y - 3 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.6MB, alloc=32.3MB, time=0.82 memory used=68.8MB, alloc=56.3MB, time=1.22 memory used=110.5MB, alloc=60.3MB, time=1.99 memory used=145.6MB, alloc=84.3MB, time=3.01 N1 := 945 > GB := Basis(F, plex(op(vars))); 2 GB := [833 x + 1083, 20 y - 51, 119 x + 57 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 165 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [9 z + 20 y, 7 z x - 19, -3 z - 17, x y + 6 y z, 19 x, -9 y - 3 x] > J:=[op(GB),op(G)]; 2 2 J := [833 x + 1083, 20 y - 51, 57 z + 119 x, x y + 6 y z, 19 x, -9 y - 3 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 2/3, 1/2, 2/3, 1/3, 1/3, 1/3, 6, 10, 9, 2, 2, 2, 1, 5/6, 1/2, 1/3, 5/12, 1/3, 1/6, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=170.5MB, alloc=84.3MB, time=3.41 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246946 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-y + 2 y z, 7 y + 3 z, -11 y - 8 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-5 x + 18, -x - 10 y , 11 x z + 16 z ] > Problem := [F,G]; 2 2 Problem := [[-y + 2 y z, 7 y + 3 z, -11 y - 8 z], 2 2 2 2 [-5 x + 18, -x - 10 y , 11 x z + 16 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=67.8MB, alloc=32.3MB, time=1.09 memory used=87.5MB, alloc=56.3MB, time=1.46 memory used=127.6MB, alloc=60.3MB, time=2.17 memory used=162.0MB, alloc=84.3MB, time=2.87 memory used=211.6MB, alloc=108.3MB, time=4.55 N1 := 1703 > GB := Basis(F, plex(op(vars))); GB := [y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 99 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-y + 2 y z, 3 z + 7 y, -11 y - 8 z, -5 x + 18, -x - 10 y , 2 11 x z + 16 z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [y, z, -5 x + 18, -x - 10 y , 11 x z + 16 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 5/12, 5, 7, 8, 2, 2, 2, 2, 3/5, 2/5, 2/5, 3/8, 1/4, 3/8, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=266.4MB, alloc=108.3MB, time=6.05 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428246962 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [19 x + 2 z, -20 z + 18 x, -5 y + 10 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [3 x z - 2 z, -x z + 4 z , 5 z + y] > Problem := [F,G]; 2 2 2 Problem := [[19 x + 2 z, -20 z + 18 x, -5 y + 10 y z], 2 2 [3 x z - 2 z, -x z + 4 z , 5 z + y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.77 memory used=67.4MB, alloc=32.3MB, time=1.06 memory used=86.4MB, alloc=56.3MB, time=1.36 memory used=124.9MB, alloc=60.3MB, time=1.94 memory used=162.1MB, alloc=84.3MB, time=2.57 memory used=219.7MB, alloc=108.3MB, time=3.67 memory used=297.7MB, alloc=132.3MB, time=5.02 memory used=390.0MB, alloc=164.3MB, time=6.67 memory used=491.5MB, alloc=188.3MB, time=8.81 memory used=596.3MB, alloc=212.3MB, time=11.75 memory used=709.2MB, alloc=236.3MB, time=15.78 memory used=840.1MB, alloc=260.3MB, time=20.98 memory used=994.9MB, alloc=260.3MB, time=26.93 memory used=1149.8MB, alloc=284.3MB, time=32.85 memory used=1328.6MB, alloc=284.3MB, time=39.78 memory used=1507.4MB, alloc=284.3MB, time=46.82 memory used=1686.0MB, alloc=308.3MB, time=53.83 N1 := 6717 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [1805 x - 18 x, 19 x y + y , 19 x + 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1894.3MB, alloc=308.3MB, time=60.84 N2 := 1131 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [19 x + 2 z, -20 z + 18 x, -5 y + 10 y z, 3 x z - 2 z, -x z + 4 z , 2 5 z + y] > J:=[op(GB),op(G)]; 4 2 2 2 2 J := [1805 x - 18 x, 19 x y + y , 19 x + 2 z, 3 x z - 2 z, -x z + 4 z , 2 5 z + y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 1/3, 1, 1/3, 1/4, 2/3, 6, 11, 15, 4, 4, 2, 2, 5/6, 1/3, 2/3, 1/2, 1/4, 1/2, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1984.1MB, alloc=308.3MB, time=63.31 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247160 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-19 z - 9 y, -12 + 3 z, -6 z + 3 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [19 x y + 12 x, 12 x y, -8 y] > Problem := [F,G]; Problem := 2 2 [[-19 z - 9 y, -12 + 3 z, -6 z + 3 z], [19 x y + 12 x, 12 x y, -8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.1MB, alloc=32.3MB, time=0.56 N1 := 261 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 15 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-19 z - 9 y, -12 + 3 z, -6 z + 3 z, 19 x y + 12 x, 12 x y, -8 y] > J:=[op(GB),op(G)]; J := [1, 19 x y + 12 x, 12 x y, -8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 1, 2, 1/3, 2/3, 1/2, 3/13, 4/13, 4/13, 4, 5, 5, 2, 1, 1, 0, 1/2, 3/4, 0, 3/8, 3/8, 0, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=34.0MB, alloc=32.3MB, time=0.70 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247162 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [13 x y - 8 y , -16 x z + 10 z , -19 x y + 13] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-3 x z - 16 x, 12 y z - 6, -15 x - 12 y z] > Problem := [F,G]; 2 2 Problem := [[13 x y - 8 y , -16 x z + 10 z , -19 x y + 13], 2 [-3 x z - 16 x, 12 y z - 6, -15 x - 12 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.80 memory used=67.5MB, alloc=32.3MB, time=1.10 memory used=86.5MB, alloc=56.3MB, time=1.44 memory used=127.2MB, alloc=60.3MB, time=2.21 memory used=163.8MB, alloc=84.3MB, time=2.95 memory used=219.4MB, alloc=108.3MB, time=3.99 memory used=290.4MB, alloc=140.3MB, time=5.75 memory used=370.2MB, alloc=164.3MB, time=8.64 memory used=468.1MB, alloc=164.3MB, time=12.49 memory used=566.1MB, alloc=188.3MB, time=16.30 N1 := 3421 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x - 8, -13 x + 8 y, -8 x z + 5 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=689.2MB, alloc=188.3MB, time=19.79 memory used=816.1MB, alloc=468.3MB, time=22.25 memory used=961.0MB, alloc=492.3MB, time=28.07 N2 := 2461 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [13 x y - 8 y , -16 x z + 10 z , -19 x y + 13, -3 x z - 16 x, 12 y z - 6, 2 -15 x - 12 y z] > J:=[op(GB),op(G)]; 2 2 J := [19 x - 8, -13 x + 8 y, -8 x z + 5 z , -3 x z - 16 x, 12 y z - 6, 2 -15 x - 12 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 5/6, 2/3, 2/3, 1/2, 5/12, 5/12, 6, 12, 11, 2, 2, 1, 2, 5/6, 1/2, 2/3, 1/2, 1/4, 5/12, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1022.1MB, alloc=492.3MB, time=30.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247257 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [y z + 16 x, 19 y z + 4 z, -16 x + 11 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 x - 11 y z, 4 x - 5 x, -11 x z + 17 x] > Problem := [F,G]; 2 Problem := [[y z + 16 x, 19 y z + 4 z, -16 x + 11 y z], 2 2 [16 x - 11 y z, 4 x - 5 x, -11 x z + 17 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.51 memory used=48.2MB, alloc=32.3MB, time=0.91 memory used=67.2MB, alloc=56.3MB, time=1.37 N1 := 563 > GB := Basis(F, plex(op(vars))); 2 GB := [x + 11 x, 19 x y + 4 x, z - 76 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=105.7MB, alloc=60.3MB, time=2.02 N2 := 441 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [z y + 16 x, 19 y z + 4 z, -16 x + 11 y z, -11 z y + 16 x , 4 x - 5 x, -11 x z + 17 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x + 11 x, 19 x y + 4 x, z - 76 x, -11 z y + 16 x , 4 x - 5 x, -11 x z + 17 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 1, 1, 5/6, 2/3, 5/6, 7/12, 1/3, 1/2, 6, 11, 11, 2, 2, 1, 1, 1, 1/3, 1/2, 5/6, 1/6, 1/4, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=120.4MB, alloc=60.3MB, time=2.34 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247263 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-2 y z + 8 y, -14 x + 19 y , -4 y + 6 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-4 y z - 15, -15 x - 20 z, 8 x + 20 y ] > Problem := [F,G]; 2 2 2 Problem := [[-2 y z + 8 y, -14 x + 19 y , -4 y + 6 x], 2 2 2 [-4 y z - 15, -15 x - 20 z, 8 x + 20 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=54.8MB, alloc=68.3MB, time=0.94 memory used=105.3MB, alloc=68.3MB, time=1.84 memory used=149.2MB, alloc=92.3MB, time=2.74 memory used=207.1MB, alloc=116.3MB, time=4.75 N1 := 1505 > GB := Basis(F, plex(op(vars))); 2 2 GB := [28 x - 57 x, 2 y - 3 x, x z - 4 x, y z - 4 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=287.2MB, alloc=124.3MB, time=6.28 N2 := 629 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-2 y z + 8 y, -14 x + 19 y , -4 y + 6 x, -4 y z - 15, -15 x - 20 z, 2 2 8 x + 20 y ] > J:=[op(GB),op(G)]; 2 2 J := [28 x - 57 x, 2 y - 3 x, x z - 4 x, y z - 4 y, -4 y z - 15, 2 2 2 -15 x - 20 z, 8 x + 20 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 1, 2/3, 5/6, 1/2, 1/3, 1/2, 1/4, 7, 13, 14, 2, 2, 2, 1, 5/7, 4/7, 4/7, 1/2, 5/14, 2/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=307.1MB, alloc=124.3MB, time=6.78 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247282 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-9 x z - 4 y , -17 z - 8 z, 12 x + 5 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [y z + 3 z, -20 x + 2 y , 2 - 20 y] > Problem := [F,G]; 2 2 2 Problem := [[-9 x z - 4 y , -17 z - 8 z, 12 x + 5 x y], 2 2 [y z + 3 z, -20 x + 2 y , 2 - 20 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.4MB, alloc=32.3MB, time=0.75 memory used=68.8MB, alloc=56.3MB, time=1.12 memory used=109.6MB, alloc=60.3MB, time=1.83 memory used=145.8MB, alloc=84.3MB, time=2.47 memory used=200.7MB, alloc=108.3MB, time=3.77 memory used=267.8MB, alloc=108.3MB, time=6.20 memory used=333.0MB, alloc=132.3MB, time=8.62 N1 := 2199 > GB := Basis(F, plex(op(vars))); 4 3 2 3 3 2 GB := [136 x - 25 x , 12 x + 5 x y, 1728 x + 125 y , 9 z x + 4 y , 2 2 2 17 y z + 8 y , 17 z + 8 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=419.0MB, alloc=140.3MB, time=10.05 memory used=515.1MB, alloc=164.3MB, time=11.71 memory used=628.6MB, alloc=188.3MB, time=15.04 N2 := 2199 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-9 x z - 4 y , -17 z - 8 z, 12 x + 5 x y, y z + 3 z, -20 x + 2 y , 2 - 20 y] > J:=[op(GB),op(G)]; 4 3 2 3 3 2 J := [136 x - 25 x , 12 x + 5 x y, 1728 x + 125 y , 9 z x + 4 y , 2 2 2 2 2 17 y z + 8 y , 17 z + 8 z, y z + 3 z, -20 x + 2 y , 2 - 20 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 5/6, 1/2, 1/3, 5/12, 5/12, 9, 16, 21, 4, 4, 3, 2, 5/9, 7/9, 4/9, 7/18, 4/9, 1/3, -5, -10, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=724.5MB, alloc=188.3MB, time=18.44 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247338 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-12 z + 6 x, 17 x + 14 x y, -10 + 7 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-12 x - 5, -3 + 11 x, -9 x + 2] > Problem := [F,G]; 2 2 Problem := [[-12 z + 6 x, 17 x + 14 x y, -10 + 7 y], 2 2 [-12 x - 5, -3 + 11 x, -9 x + 2]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 163 > GB := Basis(F, plex(op(vars))); 2 2 GB := [17 x + 20 x, 7 y - 10, 2 z - x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=27.4MB, alloc=32.3MB, time=0.57 N2 := 99 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-12 z + 6 x, 17 x + 14 x y, 7 y - 10, -12 x - 5, 11 x - 3, -9 x + 2] > J:=[op(GB),op(G)]; 2 2 2 2 J := [17 x + 20 x, 7 y - 10, 2 z - x, -12 x - 5, 11 x - 3, -9 x + 2] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 10, 2, 2, 1, 2, 5/6, 1/3, 1/6, 1/2, 1/6, 1/12, 6, 7, 10, 2, 2, 1, 2, 5/6, 1/6, 1/6, 1/2, 1/12, 1/12, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=40.9MB, alloc=32.3MB, time=0.78 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247340 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-z - 11, 2 x z + 3, -20 x y + 14 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-17 y z, 19 x - 18 x y, 8 x y + 2 y] > Problem := [F,G]; 2 2 Problem := [[-z - 11, 2 x z + 3, -20 x y + 14 z ], 2 [-17 y z, 19 x - 18 x y, 8 x y + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=49.3MB, alloc=32.3MB, time=0.91 memory used=69.2MB, alloc=56.3MB, time=1.34 N1 := 477 > GB := Basis(F, plex(op(vars))); 2 GB := [44 x + 9, -1694 x + 45 y, -22 x + 3 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 149 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 -z - 11, 2 z x + 3, -20 x y + 14 z , -17 y z, 19 x - 18 x y, 8 x y + 2 y] > J:=[op(GB),op(G)]; 2 2 J := [44 x + 9, -1694 x + 45 y, -22 x + 3 z, -17 y z, 19 x - 18 x y, 8 x y + 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 2/3, 2/3, 2/3, 5/13, 5/13, 4/13, 6, 11, 10, 2, 2, 1, 1, 5/6, 2/3, 1/3, 6/13, 5/13, 2/13, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=92.3MB, alloc=56.3MB, time=1.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247345 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-4 y + 13 y z, 15 x, 5 x - 10 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-14 + 19 z, 14, -12 y z + 16 x] > Problem := [F,G]; Problem := 2 2 2 [[-4 y + 13 y z, 15 x, 5 x - 10 y ], [-14 + 19 z, 14, -12 y z + 16 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.8MB, alloc=32.3MB, time=0.53 memory used=48.3MB, alloc=56.3MB, time=0.92 memory used=90.7MB, alloc=60.3MB, time=1.90 N1 := 827 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y , z y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 77 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-4 y + 13 y z, 15 x, 5 x - 10 y , 19 z - 14, 14, -12 y z + 16 x] > J:=[op(GB),op(G)]; 2 J := [x, y , z y, 19 z - 14, 14, -12 y z + 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 8, 2, 2, 2, 1, 1/2, 1/2, 1/2, 3/11, 4/11, 3/11, 6, 8, 8, 2, 1, 2, 1, 1/3, 1/2, 1/2, 1/5, 3/10, 3/10, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=109.6MB, alloc=60.3MB, time=2.29 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247353 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [6 x y - 19, -12 y - 2 y z, 16 x + 20 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-5 z + 20, -6 x z + 2 z , -18 x z + 18 y] > Problem := [F,G]; 2 2 Problem := [[6 x y - 19, -12 y - 2 y z, 16 x + 20 y z], 2 2 [-5 z + 20, -6 x z + 2 z , -18 x z + 18 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=47.0MB, alloc=32.3MB, time=0.76 memory used=67.2MB, alloc=32.3MB, time=1.04 memory used=86.3MB, alloc=56.3MB, time=1.35 memory used=125.8MB, alloc=60.3MB, time=1.94 memory used=161.4MB, alloc=84.3MB, time=2.48 memory used=216.0MB, alloc=84.3MB, time=3.31 memory used=268.0MB, alloc=108.3MB, time=4.11 memory used=341.2MB, alloc=116.3MB, time=5.25 memory used=410.8MB, alloc=140.3MB, time=6.32 memory used=501.6MB, alloc=164.3MB, time=7.77 memory used=614.2MB, alloc=188.3MB, time=9.84 memory used=733.8MB, alloc=212.3MB, time=12.02 memory used=858.2MB, alloc=492.3MB, time=14.32 memory used=996.3MB, alloc=516.3MB, time=16.91 memory used=1141.9MB, alloc=540.3MB, time=19.66 memory used=1295.1MB, alloc=564.3MB, time=22.60 memory used=1451.4MB, alloc=588.3MB, time=26.09 memory used=1598.2MB, alloc=612.3MB, time=30.75 memory used=1752.4MB, alloc=636.3MB, time=36.11 memory used=1918.3MB, alloc=660.3MB, time=42.20 memory used=2097.6MB, alloc=684.3MB, time=48.94 memory used=2291.0MB, alloc=708.3MB, time=56.42 memory used=2498.4MB, alloc=732.3MB, time=64.77 memory used=2719.8MB, alloc=756.3MB, time=73.95 memory used=2953.1MB, alloc=780.3MB, time=84.33 memory used=3210.3MB, alloc=804.3MB, time=95.86 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247653 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [6 y z - 8 z , -14 x z - 6 y, -14 x - 14 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-11 y + 14 x, x z - 15 y , -14 y - 8 y] > Problem := [F,G]; 2 2 Problem := [[6 y z - 8 z , -14 x z - 6 y, -14 x - 14 x z], 2 2 2 [-11 y + 14 x, x z - 15 y , -14 y - 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.78 memory used=67.6MB, alloc=32.3MB, time=1.07 memory used=87.1MB, alloc=56.3MB, time=1.38 memory used=125.7MB, alloc=60.3MB, time=1.96 memory used=164.7MB, alloc=84.3MB, time=2.66 memory used=222.1MB, alloc=84.3MB, time=3.65 memory used=273.3MB, alloc=108.3MB, time=4.58 memory used=342.9MB, alloc=140.3MB, time=6.09 memory used=421.3MB, alloc=164.3MB, time=8.72 memory used=516.2MB, alloc=188.3MB, time=12.39 memory used=635.1MB, alloc=188.3MB, time=16.84 N1 := 3267 > GB := Basis(F, plex(op(vars))); 4 3 2 2 3 2 GB := [7 x + 4 x , -7 x + 3 y, x + x z, 7 x + 4 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=753.6MB, alloc=188.3MB, time=19.34 N2 := 1257 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [6 y z - 8 z , -14 x z - 6 y, -14 x - 14 x z, -11 y + 14 x, z x - 15 y , 2 -14 y - 8 y] > J:=[op(GB),op(G)]; 4 3 2 2 3 2 2 J := [7 x + 4 x , -7 x + 3 y, x + x z, 7 x + 4 z , -11 y + 14 x, 2 2 z x - 15 y , -14 y - 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 2/3, 5/6, 2/3, 5/12, 1/2, 5/12, 7, 13, 17, 4, 4, 2, 2, 6/7, 4/7, 3/7, 4/7, 5/14, 3/14, 0, -5, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=895.1MB, alloc=188.3MB, time=22.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428247727 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [13 x z + 7 y , 20 x z + 20 y z, 4 x + 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [14 z + 11 y, -3 x - 12 x z, 10 x - 8 y z] > Problem := [F,G]; 2 2 Problem := [[13 x z + 7 y , 20 x z + 20 y z, 4 x + 5 y], 2 2 2 [14 z + 11 y, -3 x - 12 x z, 10 x - 8 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.49 memory used=48.2MB, alloc=32.3MB, time=0.81 memory used=68.3MB, alloc=32.3MB, time=1.11 memory used=87.4MB, alloc=56.3MB, time=1.41 memory used=127.6MB, alloc=60.3MB, time=2.01 memory used=163.5MB, alloc=84.3MB, time=2.60 memory used=209.0MB, alloc=84.3MB, time=3.31 memory used=266.7MB, alloc=116.3MB, time=4.37 memory used=340.8MB, alloc=140.3MB, time=5.82 memory used=431.6MB, alloc=164.3MB, time=7.56 memory used=538.4MB, alloc=188.3MB, time=9.71 memory used=650.9MB, alloc=468.3MB, time=11.98 memory used=782.8MB, alloc=492.3MB, time=14.82 memory used=914.3MB, alloc=516.3MB, time=18.80 memory used=1054.8MB, alloc=540.3MB, time=23.42 memory used=1206.8MB, alloc=564.3MB, time=28.97 memory used=1370.6MB, alloc=588.3MB, time=35.96 memory used=1558.4MB, alloc=612.3MB, time=43.81 memory used=1770.2MB, alloc=636.3MB, time=52.38 memory used=2005.9MB, alloc=636.3MB, time=62.24 memory used=2241.6MB, alloc=636.3MB, time=72.28 memory used=2477.3MB, alloc=660.3MB, time=82.12 memory used=2736.7MB, alloc=660.3MB, time=92.65 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248027 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 y z + 4 z , -x z - 1, -x y - 13 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [12 y - 3 y z, -18 x + 20 z , -12 x + 6 y] > Problem := [F,G]; 2 2 Problem := [[-18 y z + 4 z , -x z - 1, -x y - 13 y ], 2 2 2 2 [12 y - 3 y z, -18 x + 20 z , -12 x + 6 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.79 memory used=67.2MB, alloc=32.3MB, time=1.09 memory used=86.5MB, alloc=56.3MB, time=1.39 memory used=128.1MB, alloc=60.3MB, time=2.09 memory used=166.1MB, alloc=84.3MB, time=2.79 memory used=222.7MB, alloc=108.3MB, time=3.83 memory used=297.4MB, alloc=132.3MB, time=5.23 memory used=387.6MB, alloc=164.3MB, time=6.92 memory used=490.0MB, alloc=188.3MB, time=8.87 memory used=598.3MB, alloc=212.3MB, time=11.90 memory used=716.5MB, alloc=236.3MB, time=15.62 memory used=844.9MB, alloc=260.3MB, time=20.51 memory used=995.2MB, alloc=284.3MB, time=26.40 memory used=1169.5MB, alloc=284.3MB, time=33.15 memory used=1343.8MB, alloc=284.3MB, time=39.89 memory used=1518.1MB, alloc=308.3MB, time=46.61 memory used=1716.2MB, alloc=308.3MB, time=54.42 memory used=1914.5MB, alloc=308.3MB, time=62.01 memory used=2112.7MB, alloc=332.3MB, time=69.64 memory used=2335.0MB, alloc=356.3MB, time=78.16 N1 := 7787 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x - 26, 13 y + x, 9 x + 26 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2444.4MB, alloc=356.3MB, time=80.61 N2 := 1495 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-18 y z + 4 z , -x z - 1, -x y - 13 y , 12 y - 3 y z, -18 x + 20 z , 2 -12 x + 6 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [9 x - 26, 13 y + x, 26 z + 9 x, 12 y - 3 y z, -18 x + 20 z , 2 -12 x + 6 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 2/3, 2/3, 1/3, 1/2, 5/12, 6, 11, 10, 2, 2, 2, 2, 5/6, 1/2, 1/2, 5/12, 1/3, 1/4, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2557.2MB, alloc=612.3MB, time=84.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248298 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-7 x + 16 x y, 12 y z + 10 x, 11 x y - 18 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [8 x y + 19, 8 y - 6, -15 z + 19 y] > Problem := [F,G]; 2 2 Problem := [[-7 x + 16 x y, 12 y z + 10 x, 11 x y - 18 y ], 2 2 [8 x y + 19, 8 y - 6, -15 z + 19 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.51 memory used=47.6MB, alloc=32.3MB, time=0.82 memory used=68.9MB, alloc=56.3MB, time=1.19 memory used=111.3MB, alloc=60.3MB, time=1.95 memory used=150.2MB, alloc=84.3MB, time=2.64 memory used=207.6MB, alloc=108.3MB, time=4.04 memory used=277.0MB, alloc=108.3MB, time=6.64 N1 := 1711 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , y x, y , 6 z y + 5 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=349.4MB, alloc=116.3MB, time=8.05 N2 := 639 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-7 x + 16 x y, 12 y z + 10 x, 11 x y - 18 y , 8 y x + 19, 8 y - 6, 2 -15 z + 19 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x , y x, y , 6 z y + 5 x, 8 y x + 19, 8 y - 6, -15 z + 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 1, 1/3, 5/12, 7/12, 1/6, 7, 12, 14, 2, 2, 2, 2, 4/7, 6/7, 2/7, 2/7, 3/7, 1/7, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=367.0MB, alloc=116.3MB, time=8.55 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248323 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 y z + 6, 9 x z + 19 y, -14 y z - 3 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [15 x - 5 y, 15 x y + 12, 12 + 7 x] > Problem := [F,G]; 2 Problem := [[-11 y z + 6, 9 x z + 19 y, -14 y z - 3 z ], 2 [15 x - 5 y, 15 x y + 12, 12 + 7 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.19 memory used=26.1MB, alloc=32.3MB, time=0.51 memory used=47.5MB, alloc=32.3MB, time=0.86 memory used=68.2MB, alloc=56.3MB, time=1.27 memory used=109.1MB, alloc=84.3MB, time=2.04 N1 := 923 > GB := Basis(F, plex(op(vars))); 2 GB := [42 x - 19, 77 y + 9, 3 z + 14 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 123 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-11 y z + 6, 9 z x + 19 y, -14 y z - 3 z , 15 x - 5 y, 15 x y + 12, 7 x + 12] > J:=[op(GB),op(G)]; 2 2 J := [42 x - 19, 77 y + 9, 3 z + 14 y, 15 x - 5 y, 15 x y + 12, 7 x + 12] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 2, 2/3, 5/6, 1/2, 1/3, 5/12, 1/3, 6, 9, 9, 2, 2, 2, 1, 2/3, 2/3, 1/6, 1/3, 1/3, 1/12, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=157.7MB, alloc=84.3MB, time=3.16 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248333 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-x y + 20 x z, -11 x y + 14 y , -z + 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [5 y z + 15, -7 y + 2 y z, 11 z + 11] > Problem := [F,G]; 2 2 Problem := [[-x y + 20 x z, -11 x y + 14 y , -z + 2 z], 2 2 [5 y z + 15, -7 y + 2 y z, 11 z + 11]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=47.0MB, alloc=32.3MB, time=0.77 memory used=66.8MB, alloc=32.3MB, time=1.06 memory used=85.3MB, alloc=56.3MB, time=1.34 memory used=123.9MB, alloc=60.3MB, time=1.95 memory used=160.2MB, alloc=84.3MB, time=2.59 N1 := 893 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [11 x y - 560 x y, -11 x y + 14 y , -x y + 20 x z, z - 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=212.7MB, alloc=84.3MB, time=3.75 memory used=268.8MB, alloc=84.3MB, time=4.58 memory used=323.2MB, alloc=108.3MB, time=5.46 N2 := 893 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-x y + 20 x z, -11 x y + 14 y , -z + 2 z, 5 y z + 15, -7 y + 2 y z, 2 11 z + 11] > J:=[op(GB),op(G)]; 2 2 2 J := [11 x y - 560 x y, -11 x y + 14 y , -x y + 20 x z, z - 2 z, 5 y z + 15, 2 2 -7 y + 2 y z, 11 z + 11] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 1, 2, 2, 1/3, 2/3, 5/6, 1/4, 1/2, 1/2, 7, 13, 15, 3, 2, 2, 2, 3/7, 5/7, 5/7, 5/14, 4/7, 3/7, -2, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=377.8MB, alloc=108.3MB, time=6.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248356 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-z - 14 y, -5 z - 8, -y z + 19 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-2, 6 + 19 z, 16 x y + 11 z ] > Problem := [F,G]; Problem := 2 2 2 [[-z - 14 y, -5 z - 8, -y z + 19 x], [-2, 6 + 19 z, 16 x y + 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=67.5MB, alloc=56.3MB, time=1.12 memory used=107.8MB, alloc=60.3MB, time=1.71 memory used=145.8MB, alloc=60.3MB, time=2.26 memory used=181.5MB, alloc=84.3MB, time=2.80 memory used=235.6MB, alloc=108.3MB, time=3.75 memory used=316.8MB, alloc=116.3MB, time=5.22 memory used=394.0MB, alloc=140.3MB, time=6.53 memory used=482.7MB, alloc=164.3MB, time=8.47 memory used=576.7MB, alloc=188.3MB, time=11.62 memory used=684.4MB, alloc=212.3MB, time=15.85 memory used=816.1MB, alloc=212.3MB, time=21.19 N1 := 3543 > GB := Basis(F, plex(op(vars))); 2 GB := [2211125 x + 128, 35 y - 4, -665 x + 4 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 617 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-z - 14 y, -5 z - 8, -z y + 19 x, -2, 19 z + 6, 11 z + 16 y x] > J:=[op(GB),op(G)]; 2 2 J := [2211125 x + 128, 35 y - 4, -665 x + 4 z, -2, 19 z + 6, 11 z + 16 y x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 9, 2, 1, 1, 2, 1/3, 1/2, 5/6, 2/11, 3/11, 5/11, 6, 8, 7, 2, 2, 1, 2, 1/2, 1/3, 1/2, 3/11, 2/11, 3/11, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=947.5MB, alloc=212.3MB, time=24.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248434 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [15 x z - 13 y z, 6 x y - 13, 14 x y + 9 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-17 x z + 6 z , 17 x - 11 z, 3 x - 15 z] > Problem := [F,G]; 2 Problem := [[15 x z - 13 y z, 6 x y - 13, 14 x y + 9 z ], 2 2 [-17 x z + 6 z , 17 x - 11 z, 3 x - 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.80 memory used=68.2MB, alloc=56.3MB, time=1.13 memory used=111.6MB, alloc=60.3MB, time=1.90 memory used=149.8MB, alloc=84.3MB, time=2.56 memory used=205.2MB, alloc=108.3MB, time=4.23 N1 := 1775 > GB := Basis(F, plex(op(vars))); 2 2 GB := [90 x - 169, 13 y - 15 x, 27 z + 91] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=276.6MB, alloc=108.3MB, time=6.62 N2 := 267 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [15 x z - 13 y z, 6 y x - 13, 9 z + 14 y x, -17 x z + 6 z , -11 z + 17 x, 2 3 x - 15 z] > J:=[op(GB),op(G)]; 2 2 2 J := [90 x - 169, 13 y - 15 x, 27 z + 91, -17 x z + 6 z , -11 z + 17 x, 2 3 x - 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 1, 2, 1, 1/2, 5/6, 1/2, 1/4, 7/12, 6, 10, 10, 2, 2, 1, 2, 5/6, 1/6, 2/3, 5/12, 1/12, 5/12, 4, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=309.7MB, alloc=108.3MB, time=7.15 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248455 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [5 x + 6 z , -4 x z + 15 y , -13 z - 15 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-16 y z + 3, 6 x - 17 y, -y - 19 y] > Problem := [F,G]; 2 2 2 2 Problem := [[5 x + 6 z , -4 x z + 15 y , -13 z - 15 y], 2 2 [-16 y z + 3, 6 x - 17 y, -y - 19 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.7MB, alloc=32.3MB, time=0.54 memory used=48.1MB, alloc=32.3MB, time=0.86 memory used=68.5MB, alloc=32.3MB, time=1.16 memory used=87.9MB, alloc=56.3MB, time=1.47 memory used=126.9MB, alloc=60.3MB, time=2.05 memory used=164.9MB, alloc=60.3MB, time=2.61 memory used=202.1MB, alloc=84.3MB, time=3.23 memory used=260.9MB, alloc=92.3MB, time=4.20 memory used=318.6MB, alloc=116.3MB, time=5.16 memory used=395.5MB, alloc=140.3MB, time=6.56 memory used=487.1MB, alloc=164.3MB, time=9.43 N1 := 1501 > GB := Basis(F, plex(op(vars))); 7 3 2 4 2 2 GB := [142805 x + 31104 x , -13 x + 18 y, -845 x + 432 x z, 6 z + 5 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=591.7MB, alloc=164.3MB, time=11.37 N2 := 401 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [6 z + 5 x , -4 x z + 15 y , -13 z - 15 y, -16 y z + 3, 6 x - 17 y, 2 -y - 19 y] > J:=[op(GB),op(G)]; 7 3 2 4 2 2 J := [142805 x + 31104 x , -13 x + 18 y, -845 x + 432 x z, 6 z + 5 x , 2 2 -16 y z + 3, 6 x - 17 y, -y - 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 1/2, 1/3, 7, 12, 21, 7, 7, 2, 2, 5/7, 4/7, 3/7, 1/2, 5/14, 3/14, 0, -9, -5] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=610.1MB, alloc=164.3MB, time=11.76 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248489 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [11 y + 20 z, 11 y + 20 z, 13 x - 11 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-16 x z + 14 y, 11 x - 6 x, 18 x - 9 y ] > Problem := [F,G]; 2 2 Problem := [[11 y + 20 z, 11 y + 20 z, 13 x - 11 y z], 2 2 2 [-16 x z + 14 y, 11 x - 6 x, 18 x - 9 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=31.8MB, alloc=40.3MB, time=0.55 memory used=60.4MB, alloc=40.3MB, time=0.96 memory used=87.3MB, alloc=40.3MB, time=1.37 memory used=114.5MB, alloc=68.3MB, time=1.87 memory used=161.0MB, alloc=68.3MB, time=2.70 memory used=203.7MB, alloc=92.3MB, time=3.52 memory used=253.7MB, alloc=116.3MB, time=4.53 memory used=333.2MB, alloc=148.3MB, time=6.62 memory used=420.2MB, alloc=148.3MB, time=10.07 memory used=507.2MB, alloc=172.3MB, time=13.50 N1 := 2797 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [260 x + 121 x , 260 x + 121 y, -13 x + 11 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 561 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [11 y + 20 z, 20 z + 11 y, -11 z y + 13 x , -16 x z + 14 y, 11 x - 6 x, 2 2 18 x - 9 y ] > J:=[op(GB),op(G)]; 4 2 2 2 J := [260 x + 121 x , 260 x + 121 y, -13 x + 11 z, -16 x z + 14 y, 2 2 2 11 x - 6 x, 18 x - 9 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 1, 2/3, 5/6, 2/3, 5/12, 5/12, 1/3, 6, 11, 14, 4, 4, 2, 1, 1, 1/2, 1/3, 2/3, 1/4, 1/6, 2, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=618.1MB, alloc=172.3MB, time=16.16 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248538 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [6 x + 6 z, 8 + 18 y, 2 x y - 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-8 x z - 15, 11 x - y z, 15 x - 7 y z] > Problem := [F,G]; 2 Problem := [[6 x + 6 z, 8 + 18 y, 2 x y - 5 y], 2 2 [-8 x z - 15, 11 x - y z, 15 x - 7 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.80 memory used=68.7MB, alloc=56.3MB, time=1.18 memory used=110.4MB, alloc=60.3MB, time=1.92 memory used=148.0MB, alloc=84.3MB, time=2.73 N1 := 1363 > GB := Basis(F, plex(op(vars))); GB := [2 x - 5, 9 y + 4, 4 z + 25] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=200.8MB, alloc=84.3MB, time=4.47 memory used=256.7MB, alloc=108.3MB, time=5.34 memory used=337.0MB, alloc=116.3MB, time=6.76 memory used=411.0MB, alloc=140.3MB, time=8.40 memory used=490.8MB, alloc=164.3MB, time=11.56 N2 := 2139 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [6 x + 6 z, 8 + 18 y, 2 x y - 5 y, -8 x z - 15, -z y + 11 x , 2 -7 z y + 15 x ] > J:=[op(GB),op(G)]; 2 2 J := [2 x - 5, 9 y + 4, 4 z + 25, -8 x z - 15, -z y + 11 x , -7 z y + 15 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 1, 5/6, 2/3, 2/3, 5/12, 5/12, 1/3, 6, 11, 9, 2, 2, 1, 1, 2/3, 1/2, 2/3, 1/3, 1/4, 1/3, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=539.3MB, alloc=164.3MB, time=13.24 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248577 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [10 x + 7 x z, 11 y + 6 z, 14 y + 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [8 y z + 9 z, -3 y z + 6 z, 18 - 6 z] > Problem := [F,G]; 2 Problem := [[10 x + 7 x z, 11 y + 6 z, 14 y + 9 z], [8 y z + 9 z, -3 y z + 6 z, 18 - 6 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=46.6MB, alloc=32.3MB, time=0.74 memory used=67.3MB, alloc=56.3MB, time=1.14 memory used=108.4MB, alloc=56.3MB, time=1.86 memory used=143.1MB, alloc=80.3MB, time=2.52 memory used=194.8MB, alloc=108.3MB, time=3.88 memory used=260.5MB, alloc=108.3MB, time=6.26 memory used=326.3MB, alloc=132.3MB, time=8.65 N1 := 2345 > GB := Basis(F, plex(op(vars))); 2 GB := [x , y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 10 x + 7 x z, 6 z + 11 y, 9 z + 14 y, 8 y z + 9 z, -3 y z + 6 z, 18 - 6 z] > J:=[op(GB),op(G)]; 2 J := [x , y, z, 8 y z + 9 z, -3 y z + 6 z, 18 - 6 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 9, 2, 2, 1, 1, 1/6, 2/3, 1, 1/6, 1/3, 2/3, 6, 8, 9, 2, 2, 1, 1, 1/6, 1/2, 2/3, 1/10, 3/10, 3/5, 3, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=351.1MB, alloc=132.3MB, time=9.19 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248602 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-17 y z + 12 x, 7 x y + 9 y , -2 x z + 14] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [6 y - 20 z, -9 z + 13, 11 x + 2 y] > Problem := [F,G]; 2 Problem := [[-17 y z + 12 x, 7 x y + 9 y , -2 x z + 14], 2 [6 y - 20 z, -9 z + 13, 11 x + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.80 memory used=68.2MB, alloc=32.3MB, time=1.09 memory used=87.3MB, alloc=56.3MB, time=1.39 memory used=127.0MB, alloc=60.3MB, time=2.00 memory used=165.4MB, alloc=84.3MB, time=2.68 memory used=222.5MB, alloc=108.3MB, time=3.71 memory used=296.9MB, alloc=140.3MB, time=5.02 memory used=387.4MB, alloc=164.3MB, time=6.62 memory used=490.7MB, alloc=188.3MB, time=8.81 memory used=598.4MB, alloc=212.3MB, time=11.99 memory used=716.7MB, alloc=236.3MB, time=16.14 memory used=851.2MB, alloc=260.3MB, time=21.33 memory used=1009.7MB, alloc=260.3MB, time=27.41 memory used=1168.1MB, alloc=260.3MB, time=33.51 memory used=1326.6MB, alloc=284.3MB, time=40.04 memory used=1509.0MB, alloc=284.3MB, time=47.06 memory used=1691.6MB, alloc=308.3MB, time=54.08 N1 := 6395 > GB := Basis(F, plex(op(vars))); GB := [108 x + 833, 972 y - 5831, 119 z + 108] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 951 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-17 z y + 12 x, 7 x y + 9 y , -2 x z + 14, 6 y - 20 z, -9 z + 13, 2 y + 11 x] > J:=[op(GB),op(G)]; J := [ 2 108 x + 833, 972 y - 5831, 119 z + 108, 6 y - 20 z, -9 z + 13, 2 y + 11 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 2, 2, 2/3, 2/3, 2/3, 1/3, 5/12, 1/3, 6, 8, 7, 2, 1, 1, 2, 1/3, 1/2, 1/2, 1/6, 1/4, 1/4, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1857.2MB, alloc=308.3MB, time=58.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248768 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-2 z - 17 y, -2 x z - 19, 11 z - 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [17 x + 11 y , -16 x y - 13 y , 10 y z + 8 z] > Problem := [F,G]; 2 2 Problem := [[-2 z - 17 y, -2 x z - 19, 11 z - 5 y], 2 2 2 [17 x + 11 y , -16 x y - 13 y , 10 y z + 8 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=68.2MB, alloc=32.3MB, time=1.10 memory used=88.8MB, alloc=56.3MB, time=1.48 memory used=130.1MB, alloc=60.3MB, time=2.23 memory used=164.1MB, alloc=84.3MB, time=3.26 N1 := 1033 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 93 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-2 z - 17 y, -2 x z - 19, 11 z - 5 y, 11 y + 17 x , -16 x y - 13 y , 10 y z + 8 z] > J:=[op(GB),op(G)]; 2 2 2 J := [1, 11 y + 17 x , -16 x y - 13 y , 10 y z + 8 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 1/2, 5/12, 4, 6, 6, 2, 2, 2, 1, 1/2, 3/4, 1/4, 2/7, 4/7, 2/7, 6, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=186.4MB, alloc=84.3MB, time=3.69 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248777 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-5 x z + 2 y , 18 y z - 18 y, 3 x z + 14 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-18 x y + 5, -17 x y + 10 z , -15 y z + 19 y] > Problem := [F,G]; 2 Problem := [[-5 x z + 2 y , 18 y z - 18 y, 3 x z + 14 z], 2 [-18 x y + 5, -17 x y + 10 z , -15 y z + 19 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.81 memory used=68.6MB, alloc=32.3MB, time=1.11 memory used=87.9MB, alloc=56.3MB, time=1.41 memory used=130.0MB, alloc=60.3MB, time=2.15 memory used=167.8MB, alloc=84.3MB, time=2.83 memory used=225.0MB, alloc=108.3MB, time=3.86 memory used=298.2MB, alloc=140.3MB, time=5.37 memory used=382.1MB, alloc=164.3MB, time=7.66 memory used=474.1MB, alloc=188.3MB, time=11.14 memory used=590.1MB, alloc=188.3MB, time=15.50 memory used=706.0MB, alloc=212.3MB, time=19.88 N1 := 3961 > GB := Basis(F, plex(op(vars))); 3 2 GB := [3 x y + 14 y, 3 y + 35 y, 3 y + 35 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=849.0MB, alloc=212.3MB, time=24.16 N2 := 775 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-5 x z + 2 y , 18 y z - 18 y, 3 x z + 14 z, -18 x y + 5, -17 x y + 10 z , -15 y z + 19 y] > J:=[op(GB),op(G)]; 3 2 2 J := [3 x y + 14 y, 3 y + 35 y, 3 y + 35 z, -18 x y + 5, -17 x y + 10 z , -15 y z + 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 1, 2, 2, 2/3, 5/6, 5/6, 1/3, 7/12, 1/2, 6, 12, 13, 3, 1, 3, 2, 1/2, 1, 1/2, 1/4, 3/4, 1/4, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=934.1MB, alloc=212.3MB, time=25.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428248853 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-20 y z - 4 z , -3 x y + x, -20 y - 7 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-x y - 15 z, -19 y - 6 z, -z - 20 x] > Problem := [F,G]; 2 2 Problem := [[-20 y z - 4 z , -3 x y + x, -20 y - 7 z], 2 [-x y - 15 z, -19 y - 6 z, -z - 20 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.46 memory used=47.1MB, alloc=32.3MB, time=0.76 memory used=66.6MB, alloc=56.3MB, time=1.06 memory used=105.5MB, alloc=60.3MB, time=1.65 memory used=140.3MB, alloc=84.3MB, time=2.19 memory used=195.2MB, alloc=84.3MB, time=3.08 memory used=249.3MB, alloc=108.3MB, time=4.07 memory used=321.4MB, alloc=140.3MB, time=5.41 memory used=407.4MB, alloc=164.3MB, time=7.00 memory used=508.2MB, alloc=188.3MB, time=8.86 memory used=620.6MB, alloc=212.3MB, time=10.98 memory used=736.7MB, alloc=236.3MB, time=14.21 memory used=859.8MB, alloc=260.3MB, time=18.13 memory used=992.9MB, alloc=284.3MB, time=23.03 memory used=1140.2MB, alloc=308.3MB, time=29.08 memory used=1311.4MB, alloc=332.3MB, time=36.15 memory used=1506.5MB, alloc=356.3MB, time=44.16 memory used=1725.6MB, alloc=356.3MB, time=53.17 memory used=1944.8MB, alloc=356.3MB, time=62.06 memory used=2163.8MB, alloc=380.3MB, time=70.98 memory used=2406.8MB, alloc=380.3MB, time=80.84 memory used=2649.8MB, alloc=404.3MB, time=90.76 memory used=2916.8MB, alloc=404.3MB, time=101.59 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249153 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [3 x y + 2 z , 20 z - 13, 10 x z - 19 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [19 x z - 16 x, 17 y z + 2, -10 z - 18 z] > Problem := [F,G]; 2 2 Problem := [[3 x y + 2 z , 20 z - 13, 10 x z - 19 y z], 2 [19 x z - 16 x, 17 y z + 2, -10 z - 18 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=47.1MB, alloc=32.3MB, time=0.78 memory used=67.2MB, alloc=32.3MB, time=1.07 memory used=86.1MB, alloc=56.3MB, time=1.36 memory used=124.6MB, alloc=60.3MB, time=1.94 memory used=160.0MB, alloc=84.3MB, time=2.49 memory used=214.4MB, alloc=108.3MB, time=3.40 memory used=290.7MB, alloc=140.3MB, time=4.80 memory used=380.9MB, alloc=164.3MB, time=6.43 memory used=482.8MB, alloc=188.3MB, time=8.29 memory used=595.4MB, alloc=212.3MB, time=10.36 memory used=711.0MB, alloc=236.3MB, time=13.17 memory used=828.9MB, alloc=260.3MB, time=16.73 memory used=957.6MB, alloc=284.3MB, time=20.93 memory used=1098.0MB, alloc=308.3MB, time=26.16 memory used=1254.5MB, alloc=332.3MB, time=32.40 memory used=1435.0MB, alloc=356.3MB, time=39.56 memory used=1639.4MB, alloc=380.3MB, time=47.75 memory used=1867.8MB, alloc=380.3MB, time=56.86 memory used=2096.2MB, alloc=380.3MB, time=65.83 memory used=2324.5MB, alloc=404.3MB, time=74.78 memory used=2576.8MB, alloc=404.3MB, time=84.69 memory used=2828.9MB, alloc=404.3MB, time=94.56 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249453 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [11 x y - 13 z , x + 16 x y, 10 y + 8 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [6 x y + 20 z, -14 z - 11 z, -6 x y - 18] > Problem := [F,G]; 2 2 2 2 Problem := [[11 x y - 13 z , x + 16 x y, 10 y + 8 z ], 2 [6 x y + 20 z, -14 z - 11 z, -6 x y - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=48.0MB, alloc=32.3MB, time=0.80 memory used=68.5MB, alloc=32.3MB, time=1.10 memory used=88.2MB, alloc=56.3MB, time=1.41 memory used=128.9MB, alloc=60.3MB, time=2.07 memory used=167.8MB, alloc=84.3MB, time=2.78 memory used=225.6MB, alloc=108.3MB, time=4.33 N1 := 1209 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 2 GB := [x , x + 16 x y, -11 x + 260 y , 11 x + 208 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=296.8MB, alloc=108.3MB, time=5.72 memory used=378.4MB, alloc=140.3MB, time=7.20 N2 := 1149 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-13 z + 11 y x, x + 16 x y, 10 y + 8 z , 6 x y + 20 z, -14 z - 11 z, -6 x y - 18] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [x , x + 16 x y, -11 x + 260 y , 208 z + 11 x , 6 x y + 20 z, 2 -14 z - 11 z, -6 x y - 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 2/3, 5/6, 2/3, 5/12, 5/12, 5/12, 7, 13, 15, 3, 3, 2, 2, 6/7, 4/7, 3/7, 1/2, 2/7, 2/7, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=432.4MB, alloc=140.3MB, time=8.85 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249478 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [4 x z + 10 z , -11 x y + 18 y z, 12 x z - 13 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-15 x y - 4 z , -16 x + 6, 5 x + 15 x] > Problem := [F,G]; 2 2 Problem := [[4 x z + 10 z , -11 x y + 18 y z, 12 x z - 13 z ], 2 2 2 [-15 x y - 4 z , -16 x + 6, 5 x + 15 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=49.8MB, alloc=32.3MB, time=0.89 memory used=69.2MB, alloc=56.3MB, time=1.23 N1 := 833 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x y, z x, -11 x y + 18 y z, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.1MB, alloc=56.3MB, time=2.12 N2 := 289 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [4 x z + 10 z , -11 x y + 18 y z, 12 x z - 13 z , -15 x y - 4 z , 2 2 -16 x + 6, 5 x + 15 x] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x y, z x, -11 x y + 18 y z, z , -15 x y - 4 z , -16 x + 6, 5 x + 15 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 1, 1/3, 2/3, 7/12, 1/4, 1/2, 7, 13, 15, 3, 2, 1, 2, 6/7, 3/7, 4/7, 1/2, 2/7, 2/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=128.4MB, alloc=56.3MB, time=2.50 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249485 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-y + 7 y z, -13 y z - 8 y, 10 x y + 6] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [13 x + 4 y, -5 x - 16 z , 14 x z - 20 z ] > Problem := [F,G]; 2 Problem := [[-y + 7 y z, -13 y z - 8 y, 10 x y + 6], 2 2 2 2 [13 x + 4 y, -5 x - 16 z , 14 x z - 20 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.79 memory used=67.6MB, alloc=32.3MB, time=1.08 memory used=87.7MB, alloc=56.3MB, time=1.44 memory used=129.6MB, alloc=56.3MB, time=2.19 memory used=165.5MB, alloc=80.3MB, time=3.06 N1 := 1209 > GB := Basis(F, plex(op(vars))); GB := [280 x - 39, 13 y + 56, 13 z + 8] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=217.6MB, alloc=80.3MB, time=4.45 N2 := 337 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-y + 7 y z, -13 y z - 8 y, 10 x y + 6, 13 x + 4 y, -5 x - 16 z , 2 14 x z - 20 z ] > J:=[op(GB),op(G)]; J := [ 2 2 2 2 280 x - 39, 13 y + 56, 13 z + 8, 13 x + 4 y, -5 x - 16 z , 14 x z - 20 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 2/3, 2/3, 1/3, 1/2, 5/12, 6, 9, 9, 2, 2, 1, 2, 2/3, 1/3, 1/2, 1/3, 1/6, 1/3, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=242.9MB, alloc=84.3MB, time=4.92 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249500 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-9 x + 10 x y, -20 x y + 2 x, 10 y z + 9 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y - 18 y, 13 x z - 19 y , -9 x z - y z] > Problem := [F,G]; 2 Problem := [[-9 x + 10 x y, -20 x y + 2 x, 10 y z + 9 x], 2 2 [-9 y - 18 y, 13 x z - 19 y , -9 x z - y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.4MB, alloc=32.3MB, time=0.77 memory used=68.9MB, alloc=56.3MB, time=1.16 memory used=110.8MB, alloc=60.3MB, time=1.88 memory used=148.6MB, alloc=84.3MB, time=2.60 memory used=203.4MB, alloc=108.3MB, time=4.44 N1 := 1439 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x - x, 10 x y - x, x z + x, 10 z y + 9 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=276.2MB, alloc=108.3MB, time=5.85 memory used=354.8MB, alloc=140.3MB, time=7.18 memory used=451.9MB, alloc=164.3MB, time=8.94 memory used=560.7MB, alloc=188.3MB, time=12.43 memory used=679.0MB, alloc=188.3MB, time=17.12 N2 := 2917 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-9 x + 10 x y, -20 x y + 2 x, 10 z y + 9 x, -9 y - 18 y, 13 z x - 19 y , -9 x z - y z] > J:=[op(GB),op(G)]; 2 2 2 J := [9 x - x, 10 x y - x, x z + x, 10 z y + 9 x, -9 y - 18 y, 13 z x - 19 y , -9 x z - y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 5/6, 1, 1/2, 7/12, 7/12, 1/3, 7, 15, 14, 2, 2, 2, 1, 6/7, 5/7, 4/7, 9/14, 3/7, 5/14, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=757.2MB, alloc=188.3MB, time=19.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249559 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-5 y z + z, 10 x z - 2 y z, -11 + 10 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [10 y - 5 y z, 15 z, 17 y + 14 x] > Problem := [F,G]; Problem := [[-5 y z + z, 10 x z - 2 y z, -11 + 10 x], 2 2 [10 y - 5 y z, 15 z, 17 y + 14 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=56.3MB, time=0.86 N1 := 423 > GB := Basis(F, plex(op(vars))); GB := [10 x - 11, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 85 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-5 y z + z, 10 x z - 2 y z, 10 x - 11, 10 y - 5 y z, 15 z, 17 y + 14 x] > J:=[op(GB),op(G)]; 2 2 J := [10 x - 11, z, 10 y - 5 y z, 15 z, 17 y + 14 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 1, 2, 1, 1/2, 2/3, 2/3, 1/4, 5/12, 1/2, 5, 7, 7, 2, 1, 2, 1, 2/5, 2/5, 3/5, 2/9, 1/3, 1/3, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=67.3MB, alloc=56.3MB, time=1.22 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249562 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [14 x y - 11 y , -7 x z + 7 y, 3 x - x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 z + 10 y, 19 x y + 14 z, 5 x + 9 z] > Problem := [F,G]; 2 2 Problem := [[14 x y - 11 y , -7 x z + 7 y, 3 x - x y], 2 2 [-9 z + 10 y, 19 x y + 14 z, 5 x + 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.8MB, alloc=32.3MB, time=0.80 memory used=67.7MB, alloc=56.3MB, time=1.09 memory used=107.5MB, alloc=60.3MB, time=1.68 memory used=145.9MB, alloc=84.3MB, time=2.32 memory used=203.5MB, alloc=108.3MB, time=3.37 memory used=279.8MB, alloc=116.3MB, time=4.77 memory used=348.3MB, alloc=140.3MB, time=6.01 memory used=430.8MB, alloc=164.3MB, time=8.09 memory used=523.1MB, alloc=188.3MB, time=11.23 memory used=631.0MB, alloc=212.3MB, time=15.43 memory used=762.9MB, alloc=212.3MB, time=20.55 memory used=894.9MB, alloc=236.3MB, time=25.80 N1 := 4291 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , y x, y , z x - y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1054.6MB, alloc=236.3MB, time=30.13 memory used=1236.3MB, alloc=260.3MB, time=35.58 N2 := 1867 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [14 x y - 11 y , -7 x z + 7 y, 3 x - x y, -9 z + 10 y, 19 y x + 14 z, 2 5 x + 9 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x , y x, y , z x - y, -9 z + 10 y, 19 y x + 14 z, 5 x + 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 5/6, 2/3, 1/2, 1/2, 1/3, 7, 14, 14, 2, 2, 2, 2, 5/7, 5/7, 4/7, 5/14, 5/14, 2/7, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1257.5MB, alloc=260.3MB, time=36.31 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249675 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-x z - 16 y, -18 x - 18 y, 14 z + 15 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [16 + 4 z, 9 x - 12 x y, -3 x z + 6 y] > Problem := [F,G]; 2 Problem := [[-x z - 16 y, -18 x - 18 y, 14 z + 15 y], 2 [16 + 4 z, 9 x - 12 x y, -3 x z + 6 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=32.3MB, time=0.78 memory used=67.5MB, alloc=56.3MB, time=1.07 memory used=109.0MB, alloc=60.3MB, time=1.76 memory used=147.1MB, alloc=84.3MB, time=2.43 memory used=204.3MB, alloc=108.3MB, time=3.44 memory used=280.8MB, alloc=140.3MB, time=4.79 memory used=370.5MB, alloc=164.3MB, time=7.07 memory used=467.1MB, alloc=188.3MB, time=10.70 memory used=584.2MB, alloc=188.3MB, time=15.22 memory used=701.4MB, alloc=212.3MB, time=19.71 N1 := 3649 > GB := Basis(F, plex(op(vars))); 2 2 GB := [15 x - 3584 x, y + x, x z - 16 x, 14 z - 15 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=847.0MB, alloc=212.3MB, time=23.03 N2 := 1167 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-x z - 16 y, -18 x - 18 y, 14 z + 15 y, 16 + 4 z, 9 x - 12 x y, -3 x z + 6 y] > J:=[op(GB),op(G)]; 2 2 2 J := [15 x - 3584 x, y + x, x z - 16 x, 14 z - 15 x, 16 + 4 z, 9 x - 12 x y, -3 x z + 6 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 10, 2, 2, 1, 2, 2/3, 5/6, 2/3, 5/12, 5/12, 1/3, 7, 13, 12, 2, 2, 1, 2, 6/7, 3/7, 4/7, 9/14, 3/14, 2/7, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=893.2MB, alloc=212.3MB, time=24.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249748 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [13 x + 9 z, 19 x + 9 y z, 8 x - 18 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [9 x z + 9, 4 x y + 5 x, -16 y z - 11 z ] > Problem := [F,G]; 2 2 2 Problem := [[13 x + 9 z, 19 x + 9 y z, 8 x - 18 x y], 2 [9 x z + 9, 4 x y + 5 x, -16 y z - 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.1MB, alloc=32.3MB, time=0.77 memory used=67.1MB, alloc=32.3MB, time=1.05 memory used=86.4MB, alloc=56.3MB, time=1.35 memory used=126.2MB, alloc=60.3MB, time=1.99 memory used=163.9MB, alloc=84.3MB, time=2.70 memory used=219.4MB, alloc=108.3MB, time=3.68 memory used=292.7MB, alloc=132.3MB, time=5.04 memory used=381.2MB, alloc=164.3MB, time=6.66 memory used=482.9MB, alloc=188.3MB, time=8.94 memory used=589.9MB, alloc=212.3MB, time=12.18 memory used=708.2MB, alloc=236.3MB, time=16.38 memory used=843.5MB, alloc=260.3MB, time=21.66 memory used=1002.7MB, alloc=260.3MB, time=27.81 memory used=1162.0MB, alloc=260.3MB, time=34.02 memory used=1321.2MB, alloc=284.3MB, time=40.14 memory used=1504.4MB, alloc=284.3MB, time=47.06 memory used=1687.7MB, alloc=308.3MB, time=53.99 N1 := 6447 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [52 x - 171 x , -4 x + 9 x y, 13 x + 9 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1863.2MB, alloc=308.3MB, time=58.44 N2 := 1387 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [13 x + 9 z, 9 z y + 19 x , 8 x - 18 x y, 9 x z + 9, 4 x y + 5 x, 2 -16 y z - 11 z ] > J:=[op(GB),op(G)]; 3 2 2 2 J := [52 x - 171 x , -4 x + 9 x y, 13 x + 9 z, 9 x z + 9, 4 x y + 5 x, 2 -16 y z - 11 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 1, 2, 5/6, 2/3, 2/3, 7/12, 1/3, 5/12, 6, 11, 13, 3, 3, 1, 2, 5/6, 1/2, 1/2, 2/3, 1/4, 1/3, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1948.4MB, alloc=564.3MB, time=61.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249936 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [17 x - 12 x z, 16 y + 3 y, -19 + 15 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [10 x z + 7 z, 10 x y - 1, 10 y z + 2 x] > Problem := [F,G]; 2 2 Problem := [[17 x - 12 x z, 16 y + 3 y, -19 + 15 x], [10 x z + 7 z, 10 x y - 1, 10 y z + 2 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=48.6MB, alloc=32.3MB, time=0.83 memory used=68.1MB, alloc=56.3MB, time=1.25 N1 := 577 > GB := Basis(F, plex(op(vars))); 2 GB := [15 x - 19, 16 y + 3 y, 180 z - 323] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.0MB, alloc=60.3MB, time=1.86 N2 := 587 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [17 x - 12 x z, 16 y + 3 y, 15 x - 19, 10 x z + 7 z, 10 y x - 1, 10 y z + 2 x] > J:=[op(GB),op(G)]; J := [ 2 15 x - 19, 16 y + 3 y, 180 z - 323, 10 x z + 7 z, 10 y x - 1, 10 y z + 2 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 1, 5/6, 1/2, 1/2, 1/2, 1/3, 1/3, 6, 10, 10, 2, 1, 2, 1, 2/3, 1/2, 1/2, 1/3, 1/3, 1/3, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=143.4MB, alloc=60.3MB, time=2.59 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249944 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [15 y z, 8 y z - 14 y, 10 x y + 3 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-10 z + 13 y, -6 y z + 19 y, 15 y z - 8 z] > Problem := [F,G]; Problem := [[15 y z, 8 y z - 14 y, 10 x y + 3 y], 2 [-10 z + 13 y, -6 y z + 19 y, 15 y z - 8 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=27.2MB, alloc=32.3MB, time=0.53 N1 := 261 > GB := Basis(F, plex(op(vars))); GB := [y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 53 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [15 y z, 8 y z - 14 y, 10 x y + 3 y, -10 z + 13 y, -6 y z + 19 y, 15 y z - 8 z] > J:=[op(GB),op(G)]; 2 J := [y, -10 z + 13 y, -6 y z + 19 y, 15 y z - 8 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 1, 2, 1/6, 1, 5/6, 1/13, 9/13, 6/13, 4, 7, 7, 2, 0, 1, 2, 0, 1, 3/4, 0, 5/7, 4/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=38.3MB, alloc=32.3MB, time=0.72 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249946 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [2 x, 10 x - 17 x z, -20 x + 4 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [20 y - 10 y z, 5 + 17 y, 9 x z - 6 y] > Problem := [F,G]; Problem := [ 2 2 [2 x, 10 x - 17 x z, -20 x + 4 y], [20 y - 10 y z, 5 + 17 y, 9 x z - 6 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=48.5MB, alloc=32.3MB, time=0.84 memory used=68.1MB, alloc=56.3MB, time=1.18 N1 := 663 > GB := Basis(F, plex(op(vars))); GB := [x, y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 99 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [2 x, 10 x - 17 x z, -20 x + 4 y, 20 y - 10 y z, 17 y + 5, 9 x z - 6 y] > J:=[op(GB),op(G)]; 2 J := [x, y, 20 y - 10 y z, 17 y + 5, 9 x z - 6 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 9, 2, 2, 2, 1, 2/3, 2/3, 1/2, 5/12, 5/12, 1/4, 5, 8, 7, 2, 1, 2, 1, 2/5, 4/5, 2/5, 1/4, 5/8, 1/4, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=99.8MB, alloc=56.3MB, time=1.84 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428249952 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [8 x z + 6, 17 x y + 15, 15 x + 13 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-2 x y + 15 y z, 14 x + 5 y, 17 y + y z] > Problem := [F,G]; 2 Problem := [[8 x z + 6, 17 x y + 15, 15 x + 13 y z], 2 [-2 x y + 15 y z, 14 x + 5 y, 17 y + y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.78 memory used=67.8MB, alloc=56.3MB, time=1.08 memory used=109.8MB, alloc=60.3MB, time=1.76 memory used=149.2MB, alloc=84.3MB, time=2.45 memory used=208.0MB, alloc=84.3MB, time=3.46 memory used=261.6MB, alloc=108.3MB, time=4.37 memory used=332.6MB, alloc=140.3MB, time=6.01 memory used=413.0MB, alloc=164.3MB, time=8.74 memory used=510.8MB, alloc=164.3MB, time=12.46 memory used=608.6MB, alloc=188.3MB, time=16.18 N1 := 3255 > GB := Basis(F, plex(op(vars))); 4 3 3 GB := [68 x + 39, -20 x + 13 y, -17 x + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=734.0MB, alloc=188.3MB, time=19.18 N2 := 655 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [8 x z + 6, 17 y x + 15, 13 z y + 15 x , -2 x y + 15 y z, 5 y + 14 x, 2 17 y + y z] > J:=[op(GB),op(G)]; 4 3 3 J := [68 x + 39, -20 x + 13 y, -17 x + 13 z, -2 x y + 15 y z, 5 y + 14 x, 2 17 y + y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 2, 1, 5/6, 5/6, 2/3, 5/12, 7/12, 1/3, 6, 12, 15, 4, 4, 2, 1, 5/6, 2/3, 1/2, 5/12, 1/2, 1/4, 2, -4, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=744.2MB, alloc=188.3MB, time=19.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250009 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [12 y z + 20, 11 y + 13 z, -15 x y + 11 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 + 14 x, 20 y - 2 x, -5 z - 5 z] > Problem := [F,G]; 2 Problem := [[12 y z + 20, 11 y + 13 z, -15 x y + 11 x z], 2 2 [-9 + 14 x, 20 y - 2 x, -5 z - 5 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.46 memory used=46.8MB, alloc=32.3MB, time=0.75 memory used=66.6MB, alloc=32.3MB, time=1.02 memory used=86.1MB, alloc=56.3MB, time=1.35 memory used=127.5MB, alloc=56.3MB, time=2.08 memory used=163.9MB, alloc=80.3MB, time=2.74 memory used=200.8MB, alloc=84.3MB, time=3.41 memory used=249.7MB, alloc=108.3MB, time=4.50 memory used=312.6MB, alloc=132.3MB, time=6.58 memory used=395.3MB, alloc=132.3MB, time=9.58 memory used=478.0MB, alloc=156.3MB, time=12.58 N1 := 2939 > GB := Basis(F, plex(op(vars))); 3 2 GB := [x, 33 y - 65, 11 y + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=548.7MB, alloc=156.3MB, time=14.18 N2 := 667 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [12 y z + 20, 11 y + 13 z, -15 x y + 11 x z, 14 x - 9, 20 y - 2 x, 2 -5 z - 5 z] > J:=[op(GB),op(G)]; 3 2 2 2 J := [x, 33 y - 65, 11 y + 13 z, 14 x - 9, 20 y - 2 x, -5 z - 5 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/2, 2/3, 2/3, 1/3, 1/3, 5/12, 6, 8, 11, 3, 1, 3, 2, 1/2, 1/2, 1/3, 3/11, 3/11, 3/11, 3, 0, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=580.3MB, alloc=164.3MB, time=14.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250053 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [y z + 14 x, 9 x y + 16 y, -3 x - 17 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y + 20 z, 12 z + 11 z, 11 y z + 14 y] > Problem := [F,G]; 2 Problem := [[y z + 14 x, 9 x y + 16 y, -3 x - 17 y], 2 2 [-9 y + 20 z, 12 z + 11 z, 11 y z + 14 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.8MB, alloc=32.3MB, time=0.79 memory used=68.1MB, alloc=32.3MB, time=1.08 memory used=87.1MB, alloc=56.3MB, time=1.37 memory used=128.9MB, alloc=60.3MB, time=2.10 memory used=164.1MB, alloc=84.3MB, time=2.97 N1 := 1069 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x + 16 x, 51 y - 16 x, 8 x z + 357 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=216.6MB, alloc=84.3MB, time=4.12 N2 := 243 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [z y + 14 x, 9 x y + 16 y, -3 x - 17 y, -9 y + 20 z, 12 z + 11 z, 11 y z + 14 y] > J:=[op(GB),op(G)]; 2 2 2 J := [9 x + 16 x, 51 y - 16 x, 8 x z + 357 x, -9 y + 20 z, 12 z + 11 z, 11 y z + 14 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 7/12, 5/12, 6, 10, 11, 2, 2, 2, 2, 1/2, 1/2, 2/3, 5/12, 1/3, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=232.2MB, alloc=84.3MB, time=4.39 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250066 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [17 x + 16 z , 0, 11 x - x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-15 x + 6 y, 10 x y - 16 y, -15 + 11 z] > Problem := [F,G]; Problem := [ 2 2 2 2 [17 x + 16 z , 0, 11 x - x y], [-15 x + 6 y, 10 x y - 16 y, -15 + 11 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.52 N1 := 135 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [-11 x + x y, 16 z + 17 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.1MB, alloc=32.3MB, time=0.83 N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [16 z + 17 x , 0, 11 x - x y, -15 x + 6 y, 10 x y - 16 y, 11 z - 15] > J:=[op(GB),op(G)]; 2 2 2 2 J := [-11 x + x y, 16 z + 17 x , -15 x + 6 y, 10 x y - 16 y, 11 z - 15] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, -infinity, 2, 2, 1, 2, 2/3, 1/2, 1/3, 5/11, 4/11, 2/11, 5, 9, 9, 2, 2, 1, 2, 4/5, 3/5, 2/5, 1/2, 2/5, 1/5, 0, -infinity, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=54.1MB, alloc=32.3MB, time=0.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250069 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 x y + 6 x z, 19 z - 5 y, -2 x y - 7 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [4 + 4 x, 11 z + 11, -10 x z - 9 z ] > Problem := [F,G]; 2 Problem := [[-7 x y + 6 x z, 19 z - 5 y, -2 x y - 7 y z], 2 2 [4 + 4 x, 11 z + 11, -10 x z - 9 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.3MB, alloc=32.3MB, time=0.75 memory used=67.2MB, alloc=56.3MB, time=1.04 memory used=106.5MB, alloc=60.3MB, time=1.61 memory used=145.1MB, alloc=84.3MB, time=2.25 memory used=204.5MB, alloc=84.3MB, time=3.28 memory used=257.0MB, alloc=108.3MB, time=4.22 memory used=324.2MB, alloc=132.3MB, time=5.79 memory used=400.3MB, alloc=156.3MB, time=8.49 memory used=497.8MB, alloc=156.3MB, time=12.07 N1 := 2999 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x y + 15 x y, 12 x y + 49 y , -7 x y + 6 x z, 2 x y + 7 y z, 2 19 z - 5 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=597.3MB, alloc=156.3MB, time=15.27 memory used=648.7MB, alloc=164.3MB, time=16.16 memory used=760.3MB, alloc=188.3MB, time=18.03 memory used=894.6MB, alloc=212.3MB, time=20.70 memory used=1023.6MB, alloc=236.3MB, time=25.37 N2 := 2999 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-7 x y + 6 x z, 19 z - 5 y, -2 x y - 7 y z, 4 + 4 x, 11 z + 11, 2 -10 x z - 9 z ] > J:=[op(GB),op(G)]; 2 2 J := [19 x y + 15 x y, 12 x y + 49 y , -7 x y + 6 x z, 2 x y + 7 y z, 2 2 2 19 z - 5 y, 4 + 4 x, 11 z + 11, -10 x z - 9 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 1, 2, 2/3, 1/2, 5/6, 5/12, 1/3, 1/2, 8, 16, 16, 3, 2, 2, 2, 3/4, 5/8, 5/8, 1/2, 1/2, 3/8, -4, -5, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1165.2MB, alloc=236.3MB, time=30.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250167 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-8 x z - 4 z , 17 x - 14 y , -12 x y - 15 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-7 - 16 y, -4 y + 3 z , -12 z - 6] > Problem := [F,G]; 2 2 2 Problem := [[-8 x z - 4 z , 17 x - 14 y , -12 x y - 15 y z], 2 2 2 [-7 - 16 y, -4 y + 3 z , -12 z - 6]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.78 memory used=69.2MB, alloc=56.3MB, time=1.15 memory used=112.6MB, alloc=56.3MB, time=1.90 memory used=151.0MB, alloc=80.3MB, time=2.59 memory used=206.3MB, alloc=108.3MB, time=3.80 memory used=272.0MB, alloc=108.3MB, time=6.13 memory used=335.9MB, alloc=132.3MB, time=8.45 N1 := 2349 > GB := Basis(F, plex(op(vars))); 4 2 2 2 3 2 2 GB := [x , y x , -17 x + 14 y , 4 x + 5 x z, 4 x y + 5 y z, 2 x z + z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=424.1MB, alloc=140.3MB, time=10.30 memory used=523.3MB, alloc=164.3MB, time=12.11 memory used=634.9MB, alloc=188.3MB, time=15.68 N2 := 2349 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-8 x z - 4 z , -14 y + 17 x , -12 x y - 15 y z, -7 - 16 y, -4 y + 3 z , 2 -12 z - 6] > J:=[op(GB),op(G)]; 4 2 2 2 3 2 2 J := [x , y x , -17 x + 14 y , 4 x + 5 x z, 4 x y + 5 y z, 2 x z + z , 2 2 2 -7 - 16 y, -4 y + 3 z , -12 z - 6] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 5/12, 9, 16, 21, 4, 4, 2, 2, 2/3, 5/9, 5/9, 7/18, 1/3, 1/3, -5, -10, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=726.8MB, alloc=188.3MB, time=18.84 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250232 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [6 x + 3 z, 16 x y + 4 y, 20 x z - 14 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 x z + 10 y z, -14 y z + 18 y, -19 x - z ] > Problem := [F,G]; 2 2 Problem := [[6 x + 3 z, 16 x y + 4 y, 20 x z - 14 y ], 2 2 [6 x z + 10 y z, -14 y z + 18 y, -19 x - z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=69.0MB, alloc=56.3MB, time=1.16 N1 := 579 > GB := Basis(F, plex(op(vars))); 4 3 3 2 2 GB := [4 x + x , 4 x y + y, 20 x + 7 y , 2 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=110.9MB, alloc=60.3MB, time=1.99 memory used=150.8MB, alloc=60.3MB, time=2.60 N2 := 351 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [6 x + 3 z, 16 x y + 4 y, 20 x z - 14 y , 6 x z + 10 y z, -14 y z + 18 y, 2 2 -19 x - z ] > J:=[op(GB),op(G)]; 4 3 3 2 2 J := [4 x + x , 4 x y + y, 20 x + 7 y , 2 x + z, 6 x z + 10 y z, 2 2 -14 y z + 18 y, -19 x - z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 2/3, 5/6, 5/12, 1/2, 1/2, 7, 14, 17, 4, 4, 2, 2, 6/7, 4/7, 4/7, 1/2, 3/7, 5/14, 0, -5, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=159.4MB, alloc=60.3MB, time=2.78 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250241 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-7 x - 20 y z, -9 z - 16, 19 + 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-15 z - 3 z, -18 x + 6 z, -4 y z - 3 x] > Problem := [F,G]; 2 2 Problem := [[-7 x - 20 y z, -9 z - 16, 19 + 16 x], 2 [-15 z - 3 z, -18 x + 6 z, -4 y z - 3 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=46.8MB, alloc=32.3MB, time=0.77 memory used=66.1MB, alloc=56.3MB, time=1.07 memory used=108.0MB, alloc=60.3MB, time=1.83 memory used=144.4MB, alloc=84.3MB, time=2.63 N1 := 999 > GB := Basis(F, plex(op(vars))); 2 GB := [16 x + 19, 419430400 y + 57471561, -81920 y + 22743 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=196.7MB, alloc=84.3MB, time=3.71 memory used=255.2MB, alloc=108.3MB, time=4.69 memory used=333.9MB, alloc=132.3MB, time=6.70 N2 := 1553 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-7 x - 20 y z, -9 z - 16, 16 x + 19, -15 z - 3 z, -18 x + 6 z, -4 y z - 3 x] > J:=[op(GB),op(G)]; 2 2 J := [16 x + 19, 419430400 y + 57471561, -81920 y + 22743 z, -15 z - 3 z, -18 x + 6 z, -4 y z - 3 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 1, 2, 2/3, 1/3, 5/6, 1/3, 1/6, 1/2, 6, 10, 9, 2, 1, 2, 2, 1/2, 1/2, 2/3, 1/4, 1/4, 5/12, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=380.7MB, alloc=132.3MB, time=8.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250269 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-13 x y - 20 y , 9 y + 16, x - 20 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [x z + 8 y, 14 x z - 8 y, 20 x - 4] > Problem := [F,G]; 2 2 2 Problem := [[-13 x y - 20 y , 9 y + 16, x - 20 y z], 2 [x z + 8 y, 14 x z - 8 y, 20 x - 4]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=48.8MB, alloc=32.3MB, time=0.85 memory used=69.1MB, alloc=56.3MB, time=1.21 memory used=110.9MB, alloc=84.3MB, time=2.08 N1 := 749 > GB := Basis(F, plex(op(vars))); 2 GB := [1521 x + 6400, 20 y + 13 x, x + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=170.0MB, alloc=84.3MB, time=3.15 N2 := 551 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-13 x y - 20 y , 9 y + 16, -20 z y + x , z x + 8 y, 14 x z - 8 y, 2 20 x - 4] > J:=[op(GB),op(G)]; J := 2 2 [1521 x + 6400, 20 y + 13 x, 13 z + x, z x + 8 y, 14 x z - 8 y, 20 x - 4] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 1, 5/6, 5/6, 1/2, 5/12, 1/2, 1/4, 6, 12, 10, 2, 2, 1, 1, 1, 1/2, 1/2, 1/2, 1/4, 1/4, 1, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=196.2MB, alloc=84.3MB, time=3.70 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250280 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-18 x z + 8 x, 3 y z + 10 z, 17 z - 8 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-3 x - 12 y, -10 y + 2 y z, -12 x - 7] > Problem := [F,G]; 2 Problem := [[-18 x z + 8 x, 3 y z + 10 z, 17 z - 8 y], 2 2 2 [-3 x - 12 y, -10 y + 2 y z, -12 x - 7]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.79 memory used=68.8MB, alloc=32.3MB, time=1.16 memory used=86.6MB, alloc=56.3MB, time=1.49 N1 := 735 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x, 3 y + 10 y, 3 y z + 10 z, 17 z - 8 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=123.2MB, alloc=56.3MB, time=2.25 N2 := 341 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-18 x z + 8 x, 3 y z + 10 z, 17 z - 8 y, -3 x - 12 y, -10 y + 2 y z, 2 -12 x - 7] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x, 3 y + 10 y, 3 y z + 10 z, 17 z - 8 y, -3 x - 12 y, -10 y + 2 y z, 2 -12 x - 7] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/3, 5/12, 5/12, 7, 11, 13, 2, 2, 2, 2, 3/7, 5/7, 3/7, 3/13, 7/13, 4/13, 0, -1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=149.2MB, alloc=56.3MB, time=2.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250289 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-5 z - 13 z, -11 x z + 15 x, 7 y z - 2 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [x - 15 y z, z - 10, 12 x + 10 y ] > Problem := [F,G]; 2 2 Problem := [[-5 z - 13 z, -11 x z + 15 x, 7 y z - 2 z ], 2 2 2 2 [x - 15 y z, z - 10, 12 x + 10 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.78 memory used=66.7MB, alloc=32.3MB, time=1.06 memory used=84.9MB, alloc=56.3MB, time=1.34 memory used=122.3MB, alloc=60.3MB, time=1.91 memory used=160.2MB, alloc=84.3MB, time=2.58 memory used=216.0MB, alloc=108.3MB, time=3.58 memory used=287.8MB, alloc=132.3MB, time=4.88 memory used=372.6MB, alloc=164.3MB, time=6.44 memory used=465.6MB, alloc=188.3MB, time=8.78 memory used=566.9MB, alloc=212.3MB, time=11.92 memory used=679.7MB, alloc=236.3MB, time=16.20 memory used=816.6MB, alloc=236.3MB, time=21.33 memory used=953.4MB, alloc=260.3MB, time=26.48 memory used=1114.2MB, alloc=260.3MB, time=32.46 memory used=1274.9MB, alloc=260.3MB, time=38.47 memory used=1435.3MB, alloc=284.3MB, time=44.48 memory used=1620.0MB, alloc=308.3MB, time=51.34 N1 := 6491 > GB := Basis(F, plex(op(vars))); 2 GB := [x, 35 y z + 26 z, 5 z + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 1087 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-5 z - 13 z, -11 x z + 15 x, 7 y z - 2 z , -15 z y + x , z - 10, 2 2 12 x + 10 y ] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x, 35 y z + 26 z, 5 z + 13 z, -15 z y + x , z - 10, 12 x + 10 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/3, 1/4, 7/12, 6, 10, 11, 2, 2, 2, 2, 1/2, 1/2, 2/3, 3/11, 3/11, 6/11, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1809.6MB, alloc=308.3MB, time=56.28 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250483 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [15 x , 10 y z + 17 x, 8 x z - 14 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-2 x z - 11 z , -9 y - 3, 11 x + 20 y ] > Problem := [F,G]; 2 Problem := [[15 x , 10 y z + 17 x, 8 x z - 14 y z], 2 2 2 2 [-2 x z - 11 z , -9 y - 3, 11 x + 20 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=48.6MB, alloc=32.3MB, time=0.86 N1 := 355 > GB := Basis(F, plex(op(vars))); 2 GB := [x , y x, 40 x z + 119 x, 10 z y + 17 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=67.7MB, alloc=32.3MB, time=1.20 memory used=86.1MB, alloc=56.3MB, time=1.48 N2 := 445 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [15 x , 10 z y + 17 x, 8 x z - 14 y z, -2 x z - 11 z , -9 y - 3, 2 2 20 y + 11 x ] > J:=[op(GB),op(G)]; 2 2 2 J := [x , y x, 40 x z + 119 x, 10 z y + 17 x, -2 x z - 11 z , -9 y - 3, 2 2 20 y + 11 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 2/3, 1/2, 5/12, 1/3, 5/12, 7, 13, 14, 2, 2, 2, 2, 6/7, 4/7, 3/7, 1/2, 2/7, 2/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=120.8MB, alloc=56.3MB, time=2.11 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250488 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [5 x, 3 x z + 17, 15 x + 12 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [12 - 19 y, 11 y z + 9 y, -10 y z - 18] > Problem := [F,G]; Problem := 2 [[5 x, 3 x z + 17, 15 x + 12 x], [12 - 19 y, 11 y z + 9 y, -10 y z - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.51 memory used=48.1MB, alloc=56.3MB, time=0.89 N1 := 447 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 31 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 H := [5 x, 3 z x + 17, 15 x + 12 x, 12 - 19 y, 11 y z + 9 y, -10 y z - 18] > J:=[op(GB),op(G)]; J := [1, 12 - 19 y, 11 y z + 9 y, -10 y z - 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 2, 1, 1, 1/2, 1/2, 1/2, 1/3, 1/3, 1/4, 4, 5, 5, 2, 0, 1, 1, 0, 3/4, 1/2, 0, 4/7, 2/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=60.9MB, alloc=56.3MB, time=1.15 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250491 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-14 + 2 x, 2 x z + 6 y , -4 x y - 16 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-2 y + 12 x, -17 x + 15 y , -10 x y - 13 x] > Problem := [F,G]; 2 Problem := [[-14 + 2 x, 2 x z + 6 y , -4 x y - 16 y], 2 2 2 [-2 y + 12 x, -17 x + 15 y , -10 x y - 13 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=27.2MB, alloc=32.3MB, time=0.52 memory used=47.9MB, alloc=56.3MB, time=0.89 N1 := 461 > GB := Basis(F, plex(op(vars))); GB := [x - 7, y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=88.3MB, alloc=60.3MB, time=1.66 N2 := 417 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-14 + 2 x, 2 x z + 6 y , -4 x y - 16 y, -2 y + 12 x, -17 x + 15 y , -10 x y - 13 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x - 7, y, z, -2 y + 12 x, -17 x + 15 y , -10 x y - 13 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 1, 5/6, 1/6, 7/12, 1/2, 1/12, 6, 9, 9, 2, 2, 2, 1, 2/3, 2/3, 1/6, 1/2, 2/5, 1/10, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=109.5MB, alloc=60.3MB, time=2.07 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250497 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-20 z + 9 x, -15 x + 15 y, -2 z + 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-16 x + 20 x y, -2 z + 2 x, 4 y - 18 z] > Problem := [F,G]; 2 2 2 Problem := [[-20 z + 9 x, -15 x + 15 y, -2 z + 2 z], 2 2 2 [-16 x + 20 x y, -2 z + 2 x, 4 y - 18 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=67.9MB, alloc=32.3MB, time=1.08 memory used=87.7MB, alloc=32.3MB, time=1.37 memory used=106.6MB, alloc=56.3MB, time=1.65 memory used=148.8MB, alloc=60.3MB, time=2.40 memory used=187.6MB, alloc=84.3MB, time=3.09 memory used=246.6MB, alloc=108.3MB, time=4.12 memory used=320.7MB, alloc=132.3MB, time=5.45 memory used=402.8MB, alloc=164.3MB, time=7.45 memory used=493.7MB, alloc=188.3MB, time=10.34 memory used=600.2MB, alloc=188.3MB, time=14.24 memory used=706.8MB, alloc=212.3MB, time=18.16 memory used=837.3MB, alloc=212.3MB, time=22.91 memory used=967.7MB, alloc=236.3MB, time=27.66 memory used=1122.2MB, alloc=236.3MB, time=33.23 N1 := 5137 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x - 20 x, -20 x + 9 y, -9 x + 20 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1264.5MB, alloc=236.3MB, time=36.36 N2 := 1333 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-20 z + 9 x, -15 x + 15 y, -2 z + 2 z, -16 x + 20 x y, -2 z + 2 x, 2 4 y - 18 z] > J:=[op(GB),op(G)]; 2 2 2 J := [9 x - 20 x, -20 x + 9 y, -9 x + 20 z, -16 x + 20 x y, -2 z + 2 x, 2 4 y - 18 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 1/2, 2/3, 5/12, 1/4, 5/12, 6, 11, 10, 2, 2, 2, 2, 5/6, 1/2, 1/2, 7/12, 1/4, 1/4, 0, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1336.6MB, alloc=492.3MB, time=38.77 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250602 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 x y + 18 x, -18 z + 14, 9 x z - 3 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [15 x y + 12, -8 x + 2 x, 9 y z + 18 z ] > Problem := [F,G]; 2 Problem := [[-7 x y + 18 x, -18 z + 14, 9 x z - 3 y], 2 2 [15 x y + 12, -8 x + 2 x, 9 y z + 18 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.7MB, alloc=32.3MB, time=0.80 memory used=68.2MB, alloc=56.3MB, time=1.19 memory used=108.8MB, alloc=60.3MB, time=1.92 memory used=144.5MB, alloc=84.3MB, time=2.55 memory used=198.9MB, alloc=108.3MB, time=3.59 memory used=267.4MB, alloc=132.3MB, time=5.50 memory used=348.9MB, alloc=132.3MB, time=8.53 memory used=430.5MB, alloc=156.3MB, time=11.59 N1 := 3183 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [343 x - 324 x, -49 x + 18 y, -49 x + 54 x z, 9 z - 7] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=537.1MB, alloc=156.3MB, time=15.25 memory used=649.0MB, alloc=188.3MB, time=17.22 memory used=783.3MB, alloc=212.3MB, time=20.79 memory used=914.4MB, alloc=236.3MB, time=25.98 N2 := 3037 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-7 x y + 18 x, -18 z + 14, 9 x z - 3 y, 15 x y + 12, -8 x + 2 x, 2 9 y z + 18 z ] > J:=[op(GB),op(G)]; 3 2 2 2 J := [343 x - 324 x, -49 x + 18 y, -49 x + 54 x z, 9 z - 7, 15 x y + 12, 2 2 -8 x + 2 x, 9 y z + 18 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 2/3, 2/3, 1/2, 1/2, 1/3, 1/3, 7, 11, 15, 3, 3, 1, 2, 5/7, 3/7, 3/7, 4/7, 3/14, 2/7, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1012.1MB, alloc=236.3MB, time=29.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250686 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-6 x z + 3 y , 11 y z - 4 x, 6 x y + 7 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-8 y z - 19 z , -15 x y + 8 x z, 8 x - 11 z ] > Problem := [F,G]; 2 Problem := [[-6 x z + 3 y , 11 y z - 4 x, 6 x y + 7 x], 2 2 2 [-8 y z - 19 z , -15 x y + 8 x z, 8 x - 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.79 memory used=66.8MB, alloc=56.3MB, time=1.09 memory used=106.4MB, alloc=60.3MB, time=1.70 memory used=142.4MB, alloc=84.3MB, time=2.26 memory used=199.1MB, alloc=92.3MB, time=3.14 memory used=254.2MB, alloc=116.3MB, time=3.98 memory used=329.2MB, alloc=140.3MB, time=5.18 memory used=429.7MB, alloc=164.3MB, time=6.91 memory used=532.8MB, alloc=188.3MB, time=8.81 memory used=652.6MB, alloc=468.3MB, time=11.03 memory used=790.3MB, alloc=492.3MB, time=13.53 memory used=939.8MB, alloc=516.3MB, time=16.30 memory used=1099.5MB, alloc=540.3MB, time=19.24 memory used=1268.7MB, alloc=564.3MB, time=22.45 memory used=1444.1MB, alloc=588.3MB, time=25.87 memory used=1628.6MB, alloc=612.3MB, time=29.52 memory used=1808.1MB, alloc=636.3MB, time=34.61 memory used=1981.1MB, alloc=660.3MB, time=40.55 memory used=2162.6MB, alloc=684.3MB, time=47.17 memory used=2355.7MB, alloc=708.3MB, time=54.48 memory used=2562.1MB, alloc=732.3MB, time=62.54 memory used=2781.8MB, alloc=756.3MB, time=71.14 memory used=3015.5MB, alloc=780.3MB, time=80.47 memory used=3263.8MB, alloc=804.3MB, time=90.52 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250986 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [0, 19 x z + 6 x, 8 z + 13 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [10 - 20 x, 3 x z - 5 z, 4 y + 20 z ] > Problem := [F,G]; Problem := 2 2 2 [[0, 19 x z + 6 x, 8 z + 13 y], [10 - 20 x, 3 x z - 5 z, 4 y + 20 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.50 N1 := 315 > GB := Basis(F, plex(op(vars))); 2 GB := [4693 x y + 288 x, 19 x z + 6 x, 8 z + 13 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.2MB, alloc=32.3MB, time=0.90 memory used=67.4MB, alloc=32.3MB, time=1.15 memory used=87.7MB, alloc=56.3MB, time=1.52 N2 := 315 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [0, 19 x z + 6 x, 8 z + 13 y, 10 - 20 x, 3 x z - 5 z, 4 y + 20 z ] > J:=[op(GB),op(G)]; 2 J := [4693 x y + 288 x, 19 x z + 6 x, 8 z + 13 y, 10 - 20 x, 3 x z - 5 z, 2 2 4 y + 20 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, -infinity, 2, 1, 2, 2, 1/2, 1/3, 2/3, 4/11, 2/11, 5/11, 6, 11, 11, 2, 1, 2, 2, 2/3, 1/2, 2/3, 1/2, 1/4, 5/12, -2, -infinity, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=89.8MB, alloc=56.3MB, time=1.58 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250991 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-19 y - 6, -9 x z - 18 y, -20 y + 3 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [17 x - 17 x, 19 x z - 8 y z, 7 x z - 8 z] > Problem := [F,G]; 2 2 Problem := [[-19 y - 6, -9 x z - 18 y, -20 y + 3 x], 2 [17 x - 17 x, 19 x z - 8 y z, 7 x z - 8 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.47 memory used=48.7MB, alloc=32.3MB, time=0.84 N1 := 369 > GB := Basis(F, plex(op(vars))); 2 GB := [19 x + 40, 19 y + 6, 20 z - 19 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=67.7MB, alloc=56.3MB, time=1.20 N2 := 197 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-19 y - 6, -9 x z - 18 y, -20 y + 3 x, 17 x - 17 x, 19 x z - 8 y z, 7 x z - 8 z] > J:=[op(GB),op(G)]; 2 2 J := [19 x + 40, 19 y + 6, 20 z - 19 y, 17 x - 17 x, 19 x z - 8 y z, 7 x z - 8 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 1, 5/6, 2/3, 1/2, 1/2, 1/3, 5/12, 6, 10, 10, 2, 2, 2, 1, 2/3, 1/2, 1/2, 5/12, 1/4, 5/12, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=88.6MB, alloc=56.3MB, time=1.51 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428250996 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-6 x y + 18 z, 17 + 19 y, -6 y z - 2 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-2 + 9 x, -7 x y - 2 y z, -z ] > Problem := [F,G]; Problem := 2 [[-6 x y + 18 z, 17 + 19 y, -6 y z - 2 y], [-2 + 9 x, -7 x y - 2 y z, -z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.50 memory used=48.6MB, alloc=56.3MB, time=0.88 N1 := 577 > GB := Basis(F, plex(op(vars))); GB := [17 x - 19, 19 y + 17, 3 z + 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=88.9MB, alloc=56.3MB, time=1.64 N2 := 295 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-6 x y + 18 z, 19 y + 17, -6 y z - 2 y, 9 x - 2, -7 x y - 2 y z, -z ] > J:=[op(GB),op(G)]; 2 J := [17 x - 19, 19 y + 17, 3 z + 1, 9 x - 2, -7 x y - 2 y z, -z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 1, 1, 2, 1/2, 2/3, 2/3, 1/4, 1/2, 1/3, 6, 8, 8, 2, 1, 1, 2, 1/2, 1/3, 1/2, 1/4, 1/4, 1/4, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=95.0MB, alloc=56.3MB, time=1.77 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251003 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [7 x z - 15 y z, -10 z - 16 x, -12 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-14 x + 13 x, 18 x + 17 y , -7 x + 14 x z] > Problem := [F,G]; 2 Problem := [[7 x z - 15 y z, -10 z - 16 x, -12 x y], 2 2 2 2 [-14 x + 13 x, 18 x + 17 y , -7 x + 14 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.52 N1 := 209 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , x y, -7 x z + 15 y z, 5 z + 8 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.2MB, alloc=32.3MB, time=0.84 N2 := 209 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [7 x z - 15 y z, -10 z - 16 x, -12 x y, -14 x + 13 x, 17 y + 18 x , 2 -7 x + 14 x z] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x , x y, -7 x z + 15 y z, 5 z + 8 x, -14 x + 13 x, 17 y + 18 x , 2 -7 x + 14 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1, 1/2, 1/2, 8/13, 3/13, 4/13, 7, 13, 14, 2, 2, 2, 2, 1, 3/7, 3/7, 9/14, 3/14, 2/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=62.8MB, alloc=32.3MB, time=1.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251006 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-6 z + 11 y, -3 x + 19 z, y + 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-10 x - 10 x y, -10 y + 11, -17 x y + 19 x] > Problem := [F,G]; 2 Problem := [[-6 z + 11 y, -3 x + 19 z, y + 17 z], 2 2 [-10 x - 10 x y, -10 y + 11, -17 x y + 19 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=47.3MB, alloc=32.3MB, time=0.76 memory used=67.3MB, alloc=32.3MB, time=1.03 memory used=87.2MB, alloc=56.3MB, time=1.38 memory used=129.9MB, alloc=60.3MB, time=2.09 memory used=167.7MB, alloc=84.3MB, time=2.75 memory used=225.8MB, alloc=108.3MB, time=3.74 memory used=299.0MB, alloc=140.3MB, time=5.30 memory used=381.6MB, alloc=164.3MB, time=7.78 memory used=478.1MB, alloc=164.3MB, time=11.34 memory used=574.6MB, alloc=188.3MB, time=14.94 memory used=695.3MB, alloc=188.3MB, time=19.37 N1 := 3581 > GB := Basis(F, plex(op(vars))); 2 GB := [18 x + 3553 x, 19 y + 51 x, -3 x + 19 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 519 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-6 z + 11 y, -3 x + 19 z, 17 z + y, -10 x - 10 x y, -10 y + 11, -17 x y + 19 x] > J:=[op(GB),op(G)]; 2 2 2 J := [18 x + 3553 x, 19 y + 51 x, -3 x + 19 z, -10 x - 10 x y, -10 y + 11, -17 x y + 19 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 2, 1/2, 5/6, 1/2, 5/12, 5/12, 1/4, 6, 10, 10, 2, 2, 2, 1, 5/6, 2/3, 1/6, 2/3, 1/3, 1/12, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=780.3MB, alloc=188.3MB, time=21.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251081 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-14 y + 7 z, 14 x - 10 y , 8 x - 4 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [12 z + 4, -10 x z + 5 z , 4 z + 2 x] > Problem := [F,G]; 2 2 2 Problem := [[-14 y + 7 z, 14 x - 10 y , 8 x - 4 y], 2 2 2 [12 z + 4, -10 x z + 5 z , 4 z + 2 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=47.4MB, alloc=32.3MB, time=0.77 memory used=67.7MB, alloc=32.3MB, time=1.06 memory used=86.9MB, alloc=56.3MB, time=1.35 memory used=130.7MB, alloc=60.3MB, time=2.13 memory used=168.2MB, alloc=84.3MB, time=2.80 memory used=223.6MB, alloc=108.3MB, time=4.21 memory used=292.8MB, alloc=108.3MB, time=6.57 N1 := 1775 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [20 x - 7 x , -2 x + y, -4 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 369 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-14 y + 7 z, 14 x - 10 y , 8 x - 4 y, 12 z + 4, -10 x z + 5 z , 2 4 z + 2 x] > J:=[op(GB),op(G)]; J := 4 2 2 2 2 2 2 [20 x - 7 x , -2 x + y, -4 x + z, 12 z + 4, -10 x z + 5 z , 4 z + 2 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 1/2, 2/3, 1/3, 1/4, 5/12, 6, 10, 14, 4, 4, 1, 2, 5/6, 1/6, 2/3, 1/2, 1/12, 5/12, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=350.1MB, alloc=108.3MB, time=7.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251105 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [20 y + 14 z, 10 x - 17 z , 20 y z - 7 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [18 y + 8 y, 5 x z - 9 z , 4 x + 12 z ] > Problem := [F,G]; 2 2 Problem := [[20 y + 14 z, 10 x - 17 z , 20 y z - 7 z], 2 2 2 2 [18 y + 8 y, 5 x z - 9 z , 4 x + 12 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=47.5MB, alloc=32.3MB, time=0.78 memory used=68.7MB, alloc=56.3MB, time=1.15 memory used=112.7MB, alloc=56.3MB, time=1.90 memory used=151.2MB, alloc=80.3MB, time=2.60 memory used=206.5MB, alloc=104.3MB, time=4.20 N1 := 1791 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [40 x - 17 x , -14 x + 17 y, 20 x + 17 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=279.5MB, alloc=104.3MB, time=6.46 N2 := 393 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [20 y + 14 z, -17 z + 10 x , 20 y z - 7 z, 18 y + 8 y, 5 x z - 9 z , 2 2 4 x + 12 z ] > J:=[op(GB),op(G)]; 4 2 2 2 2 2 J := [40 x - 17 x , -14 x + 17 y, 20 x + 17 z, 18 y + 8 y, 5 x z - 9 z , 2 2 4 x + 12 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/3, 7/12, 6, 10, 14, 4, 4, 2, 2, 5/6, 1/3, 1/2, 1/2, 1/4, 1/3, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=329.7MB, alloc=108.3MB, time=7.30 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251129 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-12 x y + 14 z, 10 y - 3 z, x z - 18 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-15 y z + 17 y, -6 x + 9 z , 2 y + 11 y z] > Problem := [F,G]; Problem := [[-12 x y + 14 z, 10 y - 3 z, x z - 18 x], 2 2 2 [-15 y z + 17 y, -6 x + 9 z , 2 y + 11 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=46.5MB, alloc=32.3MB, time=0.75 memory used=65.8MB, alloc=32.3MB, time=1.02 memory used=84.2MB, alloc=56.3MB, time=1.30 memory used=121.6MB, alloc=60.3MB, time=1.86 memory used=155.4MB, alloc=84.3MB, time=2.40 memory used=211.3MB, alloc=108.3MB, time=3.36 memory used=286.7MB, alloc=140.3MB, time=4.76 memory used=376.5MB, alloc=164.3MB, time=6.42 memory used=478.9MB, alloc=188.3MB, time=8.32 memory used=594.9MB, alloc=212.3MB, time=10.46 memory used=722.9MB, alloc=236.3MB, time=12.84 memory used=858.7MB, alloc=260.3MB, time=15.42 memory used=987.4MB, alloc=540.3MB, time=17.96 memory used=1135.4MB, alloc=564.3MB, time=21.37 memory used=1275.0MB, alloc=588.3MB, time=25.75 memory used=1423.3MB, alloc=612.3MB, time=30.87 memory used=1583.6MB, alloc=636.3MB, time=36.61 memory used=1757.8MB, alloc=660.3MB, time=43.04 memory used=1946.4MB, alloc=684.3MB, time=50.18 memory used=2149.1MB, alloc=708.3MB, time=57.95 memory used=2365.4MB, alloc=732.3MB, time=66.84 memory used=2598.0MB, alloc=756.3MB, time=76.81 memory used=2854.6MB, alloc=780.3MB, time=87.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251429 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-19 x y + 6 x z, -16 x - 18 y, x - 5 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [8 z - 3 y, 7 y z - 13 z , 19 y z - 18] > Problem := [F,G]; 2 2 2 Problem := [[-19 x y + 6 x z, -16 x - 18 y, x - 5 z ], 2 2 [8 z - 3 y, 7 y z - 13 z , 19 y z - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.50 memory used=48.1MB, alloc=32.3MB, time=0.80 memory used=68.3MB, alloc=32.3MB, time=1.10 memory used=87.2MB, alloc=56.3MB, time=1.40 memory used=124.1MB, alloc=60.3MB, time=1.97 memory used=159.1MB, alloc=84.3MB, time=2.50 memory used=215.0MB, alloc=84.3MB, time=3.33 memory used=268.5MB, alloc=84.3MB, time=4.16 memory used=320.1MB, alloc=108.3MB, time=4.98 memory used=391.5MB, alloc=116.3MB, time=6.11 memory used=464.9MB, alloc=140.3MB, time=7.39 memory used=556.5MB, alloc=164.3MB, time=9.06 memory used=660.4MB, alloc=188.3MB, time=11.01 memory used=777.8MB, alloc=212.3MB, time=13.19 memory used=907.2MB, alloc=236.3MB, time=15.58 memory used=1042.7MB, alloc=516.3MB, time=18.18 memory used=1194.2MB, alloc=540.3MB, time=21.08 memory used=1355.6MB, alloc=564.3MB, time=24.10 memory used=1524.4MB, alloc=588.3MB, time=27.31 memory used=1699.9MB, alloc=612.3MB, time=30.74 memory used=1882.1MB, alloc=636.3MB, time=34.30 memory used=2070.4MB, alloc=660.3MB, time=38.14 memory used=2255.0MB, alloc=684.3MB, time=42.80 memory used=2423.3MB, alloc=708.3MB, time=48.43 memory used=2599.2MB, alloc=732.3MB, time=54.77 memory used=2786.8MB, alloc=756.3MB, time=61.91 memory used=2987.0MB, alloc=780.3MB, time=69.62 memory used=3200.7MB, alloc=804.3MB, time=78.11 memory used=3427.4MB, alloc=828.3MB, time=87.47 memory used=3668.9MB, alloc=852.3MB, time=97.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251729 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [3 x y + 9 y z, 10 y z - 1, -3 y z + 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-2 x z - 17 z , -7 y - z , 14 x z - 13 y ] > Problem := [F,G]; Problem := [[3 x y + 9 y z, 10 y z - 1, -3 y z + 5 z], 2 2 2 2 [-2 x z - 17 z , -7 y - z , 14 x z - 13 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=67.3MB, alloc=56.3MB, time=1.12 memory used=106.4MB, alloc=60.3MB, time=1.72 memory used=144.6MB, alloc=84.3MB, time=2.32 memory used=205.2MB, alloc=92.3MB, time=3.26 memory used=260.2MB, alloc=116.3MB, time=4.11 memory used=339.1MB, alloc=140.3MB, time=5.30 memory used=438.8MB, alloc=164.3MB, time=6.99 N1 := 845 > GB := Basis(F, plex(op(vars))); GB := [50 x + 9, 3 y - 5, 50 z - 3] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=545.4MB, alloc=164.3MB, time=9.06 memory used=669.0MB, alloc=164.3MB, time=11.68 N2 := 1145 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [3 x y + 9 y z, 10 z y - 1, -3 y z + 5 z, -2 x z - 17 z , -7 y - z , 2 14 z x - 13 y ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [50 x + 9, 3 y - 5, 50 z - 3, -2 x z - 17 z , -7 y - z , 14 z x - 13 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 1, 2, 2, 1/2, 5/6, 1, 1/4, 1/2, 2/3, 6, 10, 9, 2, 1, 2, 2, 1/2, 1/2, 2/3, 1/4, 1/4, 5/12, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=686.5MB, alloc=164.3MB, time=12.18 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428251764 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-2 y z - 9 z , 5 x z - 6 y , 5 x y - z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-5 z + 15 z, -7 y - 18, 20 x + 4 y z] > Problem := [F,G]; 2 2 2 Problem := [[-2 y z - 9 z , 5 x z - 6 y , 5 x y - z ], 2 2 2 [-5 z + 15 z, -7 y - 18, 20 x + 4 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.78 memory used=66.8MB, alloc=56.3MB, time=1.08 memory used=105.5MB, alloc=60.3MB, time=1.66 memory used=141.4MB, alloc=60.3MB, time=2.20 memory used=176.5MB, alloc=84.3MB, time=2.73 memory used=223.3MB, alloc=84.3MB, time=3.41 memory used=278.9MB, alloc=92.3MB, time=4.28 memory used=333.3MB, alloc=116.3MB, time=5.15 memory used=407.8MB, alloc=116.3MB, time=6.34 memory used=480.1MB, alloc=140.3MB, time=7.52 memory used=572.3MB, alloc=164.3MB, time=9.07 memory used=660.1MB, alloc=420.3MB, time=10.70 memory used=766.8MB, alloc=444.3MB, time=12.76 memory used=886.1MB, alloc=468.3MB, time=15.10 memory used=1022.1MB, alloc=492.3MB, time=17.57 memory used=1165.6MB, alloc=516.3MB, time=20.25 memory used=1318.4MB, alloc=540.3MB, time=23.43 memory used=1466.1MB, alloc=564.3MB, time=28.16 memory used=1619.9MB, alloc=588.3MB, time=33.72 memory used=1785.7MB, alloc=612.3MB, time=39.96 memory used=1963.2MB, alloc=636.3MB, time=47.21 memory used=2155.4MB, alloc=660.3MB, time=55.55 memory used=2371.7MB, alloc=684.3MB, time=64.87 memory used=2611.8MB, alloc=708.3MB, time=75.00 memory used=2875.9MB, alloc=732.3MB, time=86.20 memory used=3164.0MB, alloc=756.3MB, time=98.37 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252064 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-4 x + 13 y, -20 y - 12, -19 x y + 13] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-19 x y - 3 z, 8 x y + 11, 7 x + 5 z ] > Problem := [F,G]; 2 2 Problem := [[-4 x + 13 y, -20 y - 12, -19 x y + 13], 2 2 [-19 x y - 3 z, 8 x y + 11, 7 x + 5 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=32.3MB, time=0.80 N1 := 123 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=68.7MB, alloc=32.3MB, time=1.17 N2 := 21 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-4 x + 13 y, -20 y - 12, -19 x y + 13, -19 x y - 3 z, 8 y x + 11, 2 2 5 z + 7 x ] > J:=[op(GB),op(G)]; 2 2 J := [1, -19 x y - 3 z, 8 y x + 11, 5 z + 7 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 5/6, 1/3, 5/12, 5/12, 1/6, 4, 7, 6, 2, 2, 1, 2, 3/4, 1/2, 1/2, 3/7, 2/7, 2/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=69.1MB, alloc=32.3MB, time=1.18 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252068 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-11 x z - 9 y z, -10 x z + 5 y, -19 y - 4 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [11 y + 8 y z, -9 x z + 17 z , 17 x - 4 z ] > Problem := [F,G]; 2 2 Problem := [[-11 x z - 9 y z, -10 x z + 5 y, -19 y - 4 z ], 2 2 2 2 [11 y + 8 y z, -9 x z + 17 z , 17 x - 4 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.79 memory used=67.4MB, alloc=56.3MB, time=1.10 memory used=106.9MB, alloc=60.3MB, time=1.68 memory used=146.9MB, alloc=84.3MB, time=2.36 memory used=206.9MB, alloc=84.3MB, time=3.43 memory used=261.7MB, alloc=108.3MB, time=4.42 memory used=334.0MB, alloc=140.3MB, time=5.76 memory used=417.9MB, alloc=164.3MB, time=7.89 memory used=508.5MB, alloc=188.3MB, time=11.31 memory used=623.2MB, alloc=188.3MB, time=15.61 memory used=737.8MB, alloc=212.3MB, time=19.93 N1 := 3787 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [19 x y + y, 11 x y + 9 y , 2 z x - y, 18 y z + 11 y, -209 x y + 36 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=877.3MB, alloc=212.3MB, time=23.39 memory used=976.7MB, alloc=468.3MB, time=24.97 memory used=1123.1MB, alloc=492.3MB, time=27.25 memory used=1289.7MB, alloc=516.3MB, time=29.89 memory used=1478.8MB, alloc=540.3MB, time=33.24 memory used=1672.6MB, alloc=564.3MB, time=36.92 memory used=1872.5MB, alloc=588.3MB, time=40.69 memory used=2080.2MB, alloc=612.3MB, time=44.63 memory used=2293.7MB, alloc=636.3MB, time=48.72 memory used=2507.1MB, alloc=660.3MB, time=52.88 memory used=2721.8MB, alloc=684.3MB, time=57.28 memory used=2938.7MB, alloc=708.3MB, time=61.76 memory used=3149.3MB, alloc=732.3MB, time=67.43 memory used=3338.9MB, alloc=756.3MB, time=74.01 memory used=3534.6MB, alloc=780.3MB, time=81.36 memory used=3740.1MB, alloc=804.3MB, time=89.40 memory used=3957.4MB, alloc=828.3MB, time=97.93 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252368 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [y + 15 z, -15 x y + 2 x z, 9 y - 4 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-13 z + 3 y, -18 y - 19 x, -12 z + 5 y] > Problem := [F,G]; 2 2 Problem := [[y + 15 z, -15 x y + 2 x z, 9 y - 4 z ], 2 2 2 [-13 z + 3 y, -18 y - 19 x, -12 z + 5 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.3MB, alloc=32.3MB, time=0.78 memory used=67.6MB, alloc=32.3MB, time=1.06 memory used=86.5MB, alloc=32.3MB, time=1.33 memory used=106.4MB, alloc=56.3MB, time=1.70 memory used=148.2MB, alloc=60.3MB, time=2.43 memory used=185.2MB, alloc=84.3MB, time=3.08 memory used=242.3MB, alloc=84.3MB, time=4.06 memory used=289.7MB, alloc=108.3MB, time=5.03 memory used=350.9MB, alloc=132.3MB, time=6.71 memory used=425.9MB, alloc=156.3MB, time=9.51 memory used=524.9MB, alloc=156.3MB, time=13.23 memory used=623.9MB, alloc=156.3MB, time=16.93 N1 := 3727 > GB := Basis(F, plex(op(vars))); 2 GB := [x y, y , 15 z + y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=724.0MB, alloc=156.3MB, time=20.38 N2 := 495 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [15 z + y, -15 x y + 2 x z, 9 y - 4 z , -13 z + 3 y, -18 y - 19 x, 2 -12 z + 5 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x y, y , 15 z + y, -13 z + 3 y, -18 y - 19 x, -12 z + 5 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 2, 1/3, 1, 5/6, 1/4, 1/2, 5/12, 6, 11, 11, 2, 1, 2, 2, 1/3, 1, 1/2, 1/6, 1/2, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=773.6MB, alloc=156.3MB, time=21.31 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252438 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 x - 18 y z, -10 y + 17 z, 11 z + 5] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [15 x y - 9 z , 16 x + 14 y , 15 x y - 1] > Problem := [F,G]; 2 2 Problem := [[-3 x - 18 y z, -10 y + 17 z, 11 z + 5], 2 2 2 [15 x y - 9 z , 16 x + 14 y , 15 x y - 1]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.52 memory used=47.6MB, alloc=32.3MB, time=0.82 memory used=67.5MB, alloc=32.3MB, time=1.12 memory used=87.1MB, alloc=56.3MB, time=1.44 memory used=128.0MB, alloc=60.3MB, time=2.05 memory used=166.4MB, alloc=60.3MB, time=2.62 memory used=202.0MB, alloc=84.3MB, time=3.18 memory used=260.0MB, alloc=92.3MB, time=4.09 memory used=316.0MB, alloc=116.3MB, time=5.12 memory used=390.1MB, alloc=140.3MB, time=6.53 memory used=473.7MB, alloc=164.3MB, time=9.41 N1 := 1635 > GB := Basis(F, plex(op(vars))); 2 2 GB := [11 x - 51, 220 y + 289, -10 y + 17 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 531 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-3 x - 18 y z, -10 y + 17 z, 11 z + 5, 15 x y - 9 z , 16 x + 14 y , 15 y x - 1] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [11 x - 51, 220 y + 289, -10 y + 17 z, 15 x y - 9 z , 16 x + 14 y , 15 y x - 1] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 2/3, 5/6, 2/3, 1/3, 5/12, 1/3, 6, 11, 11, 2, 2, 2, 2, 2/3, 5/6, 1/3, 1/3, 5/12, 1/6, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=574.0MB, alloc=164.3MB, time=11.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252475 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [12 y z + 10 x, -10 x z + 12 y , 7 y + 16 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-16 x + 16 y z, -7 x - 9 y, -17 x y - 5 y] > Problem := [F,G]; 2 2 Problem := [[12 y z + 10 x, -10 x z + 12 y , 7 y + 16 y], 2 [-16 x + 16 y z, -7 x - 9 y, -17 x y - 5 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=48.0MB, alloc=32.3MB, time=0.83 memory used=68.7MB, alloc=56.3MB, time=1.19 memory used=110.5MB, alloc=60.3MB, time=1.92 memory used=147.5MB, alloc=84.3MB, time=2.99 N1 := 1019 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [8575 x - 147456 x, 1225 x + 9216 y, -35 x + 96 x z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=204.4MB, alloc=84.3MB, time=4.05 N2 := 481 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [12 y z + 10 x, -10 x z + 12 y , 7 y + 16 y, -16 x + 16 y z, -7 x - 9 y, -17 x y - 5 y] > J:=[op(GB),op(G)]; 3 2 2 2 J := [8575 x - 147456 x, 1225 x + 9216 y, -35 x + 96 x z, -16 x + 16 y z, -7 x - 9 y, -17 x y - 5 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 2, 1, 5/6, 1, 1/2, 5/12, 2/3, 1/4, 6, 12, 12, 3, 3, 1, 1, 1, 2/3, 1/3, 2/3, 5/12, 1/6, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=220.9MB, alloc=84.3MB, time=4.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252489 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-9 x y + 10 x, -19 x - 10 z, -19 x + 10 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-13 x y + 10 z, 16 x - 20 x, -16 x - y ] > Problem := [F,G]; Problem := [[-9 x y + 10 x, -19 x - 10 z, -19 x + 10 y], 2 2 2 [-13 x y + 10 z, 16 x - 20 x, -16 x - y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.50 N1 := 259 > GB := Basis(F, plex(op(vars))); 2 GB := [171 x - 100 x, -19 x + 10 y, 10 z + 19 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.0MB, alloc=32.3MB, time=0.88 memory used=67.7MB, alloc=56.3MB, time=1.19 N2 := 183 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-9 x y + 10 x, -19 x - 10 z, -19 x + 10 y, -13 x y + 10 z, 16 x - 20 x, 2 2 -16 x - y ] > J:=[op(GB),op(G)]; 2 2 J := [171 x - 100 x, -19 x + 10 y, 10 z + 19 x, -13 x y + 10 z, 16 x - 20 x, 2 2 -16 x - y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 2, 1, 1, 2/3, 1/3, 2/3, 1/3, 1/6, 6, 11, 10, 2, 2, 2, 1, 1, 1/2, 1/3, 2/3, 1/4, 1/6, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=72.7MB, alloc=56.3MB, time=1.29 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252493 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [20 x + 17 x z, x y + 19 x, 15 y z - 11] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [3 y z - 1, 17 y z - 16 z , -5 x - 10 z ] > Problem := [F,G]; 2 Problem := [[20 x + 17 x z, x y + 19 x, 15 y z - 11], 2 2 2 [3 y z - 1, 17 y z - 16 z , -5 x - 10 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=47.0MB, alloc=32.3MB, time=0.77 memory used=66.6MB, alloc=32.3MB, time=1.06 memory used=85.2MB, alloc=56.3MB, time=1.35 memory used=124.2MB, alloc=60.3MB, time=1.92 memory used=160.8MB, alloc=84.3MB, time=2.47 memory used=216.4MB, alloc=84.3MB, time=3.31 memory used=269.7MB, alloc=108.3MB, time=4.28 memory used=340.4MB, alloc=132.3MB, time=5.54 memory used=428.1MB, alloc=164.3MB, time=7.13 memory used=529.4MB, alloc=188.3MB, time=8.98 memory used=639.7MB, alloc=212.3MB, time=12.01 memory used=758.3MB, alloc=236.3MB, time=16.05 memory used=891.4MB, alloc=260.3MB, time=21.11 memory used=1048.5MB, alloc=260.3MB, time=27.10 memory used=1205.5MB, alloc=284.3MB, time=33.14 memory used=1386.6MB, alloc=284.3MB, time=40.04 memory used=1567.6MB, alloc=308.3MB, time=46.89 N1 := 5829 > GB := Basis(F, plex(op(vars))); 2 GB := [5700 x - 187 x, x y + 19 x, 285 x z + 11 x, 15 z y - 11] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1710.3MB, alloc=308.3MB, time=50.25 memory used=1952.9MB, alloc=564.3MB, time=56.81 N2 := 2171 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 x + 17 x z, x y + 19 x, 15 z y - 11, 3 z y - 1, 17 y z - 16 z , 2 2 -5 x - 10 z ] > J:=[op(GB),op(G)]; 2 J := [5700 x - 187 x, x y + 19 x, 285 x z + 11 x, 15 z y - 11, 3 z y - 1, 2 2 2 17 y z - 16 z , -5 x - 10 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 1/2, 2/3, 5/6, 5/12, 1/3, 1/2, 7, 13, 14, 2, 2, 1, 2, 4/7, 4/7, 5/7, 1/2, 2/7, 3/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2002.0MB, alloc=564.3MB, time=58.59 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252679 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-2 x y - y, 15 x y, -9 x + 3 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [13 z - 6 x, 3 x z - 11 z , -12 y - 4 y z] > Problem := [F,G]; 2 Problem := [[-2 x y - y, 15 x y, -9 x + 3 y z], 2 2 2 [13 z - 6 x, 3 x z - 11 z , -12 y - 4 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.48 memory used=48.0MB, alloc=32.3MB, time=0.81 memory used=68.6MB, alloc=56.3MB, time=1.19 memory used=113.3MB, alloc=60.3MB, time=1.91 memory used=149.3MB, alloc=84.3MB, time=2.74 N1 := 1367 > GB := Basis(F, plex(op(vars))); 2 GB := [x , y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=201.6MB, alloc=84.3MB, time=4.37 N2 := 283 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-2 x y - y, 15 x y, -9 x + 3 y z, 13 z - 6 x, 3 x z - 11 z , 2 -12 y - 4 y z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x , y, 13 z - 6 x, 3 x z - 11 z , -12 y - 4 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 5/6, 2/3, 2/3, 5/13, 6/13, 5/13, 5, 8, 9, 2, 2, 2, 2, 3/5, 2/5, 3/5, 1/3, 1/3, 4/9, 5, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=225.1MB, alloc=84.3MB, time=4.77 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252693 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 x z - 8 x, -18 y - 3 x, -13 y z + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 y - 20 z, -3 z + 5 y, 7 z + 5 x] > Problem := [F,G]; 2 Problem := [[-12 x z - 8 x, -18 y - 3 x, -13 y z + 19 y], 2 2 [6 y - 20 z, -3 z + 5 y, 7 z + 5 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.3MB, alloc=32.3MB, time=0.76 memory used=67.2MB, alloc=32.3MB, time=1.04 memory used=86.2MB, alloc=56.3MB, time=1.34 memory used=124.2MB, alloc=60.3MB, time=1.90 memory used=162.8MB, alloc=84.3MB, time=2.56 memory used=224.1MB, alloc=108.3MB, time=3.63 memory used=301.4MB, alloc=132.3MB, time=5.02 memory used=392.7MB, alloc=164.3MB, time=6.68 memory used=493.4MB, alloc=188.3MB, time=8.72 memory used=596.9MB, alloc=212.3MB, time=11.61 memory used=711.0MB, alloc=236.3MB, time=15.24 memory used=836.9MB, alloc=260.3MB, time=20.08 memory used=986.9MB, alloc=284.3MB, time=25.81 memory used=1160.7MB, alloc=284.3MB, time=32.37 memory used=1334.6MB, alloc=284.3MB, time=38.95 memory used=1508.3MB, alloc=308.3MB, time=45.53 memory used=1705.8MB, alloc=308.3MB, time=53.01 memory used=1903.3MB, alloc=308.3MB, time=60.46 memory used=2100.8MB, alloc=332.3MB, time=67.87 N1 := 7395 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y , 13 y z - 19 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2264.8MB, alloc=332.3MB, time=72.01 N2 := 1473 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-12 x z - 8 x, -18 y - 3 x, -13 y z + 19 y, 6 y - 20 z, -3 z + 5 y, 2 7 z + 5 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x, y , 13 y z - 19 y, 6 y - 20 z, -3 z + 5 y, 7 z + 5 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 1/2, 2/3, 5/6, 1/3, 5/12, 5/12, 6, 10, 10, 2, 1, 2, 2, 1/3, 2/3, 2/3, 2/11, 5/11, 4/11, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2351.5MB, alloc=588.3MB, time=74.92 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252917 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [2 x z + 10 z, 3 + 8 x, -5 y - 1] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [3 x z - 4 z , 3 y z - 5 x, 20 z - 7 z] > Problem := [F,G]; 2 Problem := [[2 x z + 10 z, 3 + 8 x, -5 y - 1], 2 2 [3 x z - 4 z , 3 y z - 5 x, 20 z - 7 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.0MB, alloc=32.3MB, time=0.51 memory used=47.8MB, alloc=56.3MB, time=0.90 N1 := 445 > GB := Basis(F, plex(op(vars))); 2 GB := [8 x + 3, 5 y + 1, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=87.6MB, alloc=60.3MB, time=1.59 N2 := 331 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [2 x z + 10 z, 8 x + 3, -5 y - 1, 3 x z - 4 z , 3 y z - 5 x, 20 z - 7 z] > J:=[op(GB),op(G)]; 2 2 2 J := [8 x + 3, 5 y + 1, z, 3 x z - 4 z , 3 y z - 5 x, 20 z - 7 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 1, 2, 2, 2/3, 1/3, 2/3, 1/3, 1/6, 7/12, 6, 9, 10, 2, 1, 2, 2, 1/2, 1/3, 2/3, 3/11, 2/11, 6/11, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=94.3MB, alloc=60.3MB, time=1.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252924 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [15 x y + 8 y z, 11 x z - 4 z, -y - 7 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 x - 6 z, 9 x z + 10 y z, z + 18 y] > Problem := [F,G]; 2 Problem := [[15 x y + 8 y z, 11 x z - 4 z, -y - 7 x], 2 2 [6 x - 6 z, 9 x z + 10 y z, z + 18 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=69.2MB, alloc=56.3MB, time=1.17 memory used=111.3MB, alloc=60.3MB, time=1.93 memory used=147.1MB, alloc=84.3MB, time=2.66 memory used=197.9MB, alloc=108.3MB, time=4.37 N1 := 1665 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [11 x - 4 x , 11 x y - 4 x y, y + 7 x, 165 x + 32 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=271.0MB, alloc=108.3MB, time=6.08 memory used=352.5MB, alloc=140.3MB, time=7.65 N2 := 1325 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [15 x y + 8 y z, 11 x z - 4 z, -y - 7 x, 6 x - 6 z, 9 x z + 10 y z, 2 z + 18 y] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [11 x - 4 x , 11 x y - 4 x y, y + 7 x, 165 x + 32 z, 6 x - 6 z, 2 9 x z + 10 y z, z + 18 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 2/3, 5/6, 5/12, 5/12, 7/12, 7, 14, 16, 3, 3, 2, 2, 6/7, 4/7, 4/7, 4/7, 5/14, 5/14, 0, -4, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=409.2MB, alloc=140.3MB, time=9.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252951 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [7 z + 19 x, -18 z + 11 x, 15 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [18 y + 6 y z, -17 x z - 5 x, -9 x z + 9 y z] > Problem := [F,G]; 2 2 Problem := [[7 z + 19 x, -18 z + 11 x, 15 x], 2 [18 y + 6 y z, -17 x z - 5 x, -9 x z + 9 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.81 memory used=69.1MB, alloc=56.3MB, time=1.21 memory used=110.9MB, alloc=84.3MB, time=1.97 N1 := 1245 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=168.8MB, alloc=84.3MB, time=3.72 N2 := 197 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [7 z + 19 x, -18 z + 11 x, 15 x, 18 y + 6 y z, -17 x z - 5 x, -9 x z + 9 y z] > J:=[op(GB),op(G)]; 2 2 J := [x, z , 18 y + 6 y z, -17 x z - 5 x, -9 x z + 9 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 5/6, 1/3, 5/6, 1/2, 1/4, 1/2, 5, 9, 9, 2, 1, 2, 2, 3/5, 2/5, 4/5, 4/9, 1/3, 5/9, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=186.5MB, alloc=84.3MB, time=4.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252965 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-5 x + 2 z, 9 x y - 8 y, 3 y z - 17] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [12 x y - 20 z, -15 x y - 16, -5 x y - 14 y ] > Problem := [F,G]; Problem := [[-5 x + 2 z, 9 x y - 8 y, 3 y z - 17], 2 [12 x y - 20 z, -15 x y - 16, -5 x y - 14 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=69.2MB, alloc=56.3MB, time=1.18 memory used=110.8MB, alloc=60.3MB, time=1.89 memory used=148.1MB, alloc=84.3MB, time=2.64 memory used=201.6MB, alloc=108.3MB, time=4.46 N1 := 1445 > GB := Basis(F, plex(op(vars))); GB := [9 x - 8, 20 y - 51, 9 z - 20] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=276.0MB, alloc=116.3MB, time=5.94 N2 := 717 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [-5 x + 2 z, 9 x y - 8 y, 3 z y - 17, 12 x y - 20 z, -15 x y - 16, 2 -5 x y - 14 y ] > J:=[op(GB),op(G)]; J := 2 [9 x - 8, 20 y - 51, 9 z - 20, 12 x y - 20 z, -15 x y - 16, -5 x y - 14 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 1, 5/6, 5/6, 1/2, 5/12, 7/12, 1/4, 6, 10, 9, 2, 1, 2, 1, 2/3, 2/3, 1/3, 1/3, 5/12, 1/6, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=310.5MB, alloc=116.3MB, time=6.76 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428252986 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-6 x z + 13 x, 7 y - 17 z , -15 x - 20 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [9 y - 15 x, -14 y - 14 y, -9 y z + 8 x] > Problem := [F,G]; 2 2 2 Problem := [[-6 x z + 13 x, 7 y - 17 z , -15 x - 20 x y], 2 2 [9 y - 15 x, -14 y - 14 y, -9 y z + 8 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=47.7MB, alloc=32.3MB, time=0.78 memory used=68.3MB, alloc=32.3MB, time=1.08 memory used=87.6MB, alloc=56.3MB, time=1.41 memory used=129.7MB, alloc=84.3MB, time=2.17 memory used=189.9MB, alloc=84.3MB, time=3.23 memory used=243.9MB, alloc=108.3MB, time=4.21 memory used=313.9MB, alloc=140.3MB, time=5.62 memory used=394.7MB, alloc=164.3MB, time=7.92 memory used=488.4MB, alloc=188.3MB, time=11.18 memory used=599.2MB, alloc=188.3MB, time=15.40 memory used=710.1MB, alloc=212.3MB, time=19.66 memory used=844.9MB, alloc=212.3MB, time=24.79 memory used=979.7MB, alloc=236.3MB, time=29.94 N1 := 4589 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [567 x - 11492 x, 3 x + 4 x y, 6 x z - 13 x, -7 y + 17 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1113.5MB, alloc=236.3MB, time=32.67 memory used=1289.9MB, alloc=516.3MB, time=35.94 memory used=1471.9MB, alloc=540.3MB, time=41.55 memory used=1649.8MB, alloc=564.3MB, time=48.69 memory used=1851.7MB, alloc=588.3MB, time=56.71 N2 := 4589 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-6 x z + 13 x, -17 z + 7 y , -15 x - 20 x y, 9 y - 15 x, -14 y - 14 y, -9 z y + 8 x] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [567 x - 11492 x, 3 x + 4 x y, 6 x z - 13 x, -7 y + 17 z , 9 y - 15 x, 2 -14 y - 14 y, -9 z y + 8 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 5/6, 1/2, 1/2, 1/2, 1/4, 7, 13, 15, 3, 3, 2, 2, 5/7, 5/7, 3/7, 4/7, 3/7, 3/14, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2021.9MB, alloc=588.3MB, time=63.07 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253185 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [14 x y + 14 z, 10 x - 2 z, 9 x z - 2 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [3 x y + 4 z , 7 z + 17, -3 y - 5] > Problem := [F,G]; 2 Problem := [[14 x y + 14 z, 10 x - 2 z, 9 x z - 2 x], 2 2 2 [3 x y + 4 z , 7 z + 17, -3 y - 5]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.79 memory used=68.0MB, alloc=32.3MB, time=1.09 memory used=87.8MB, alloc=56.3MB, time=1.39 memory used=127.7MB, alloc=60.3MB, time=1.98 memory used=165.4MB, alloc=84.3MB, time=2.54 memory used=223.1MB, alloc=84.3MB, time=3.47 memory used=279.1MB, alloc=108.3MB, time=4.49 memory used=353.5MB, alloc=140.3MB, time=5.88 memory used=439.3MB, alloc=164.3MB, time=8.24 memory used=533.5MB, alloc=188.3MB, time=11.79 N1 := 2767 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [45 x - 2 x, 5 x + x y, -5 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=655.7MB, alloc=188.3MB, time=15.65 N2 := 451 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 14 x y + 14 z, 10 x - 2 z, 9 x z - 2 x, 4 z + 3 y x, 7 z + 17, -3 y - 5 ] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [45 x - 2 x, 5 x + x y, -5 x + z, 4 z + 3 y x, 7 z + 17, -3 y - 5] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 1/2, 5/6, 5/12, 1/4, 5/12, 6, 10, 13, 3, 3, 2, 2, 2/3, 1/2, 1/2, 1/2, 1/4, 1/4, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=716.7MB, alloc=188.3MB, time=16.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253241 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 x + 7 z, 12 x y + 14 y , 5 y z + 18 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-18 x y - 8 y, -5 x z + 16, -8 x - 11 z ] > Problem := [F,G]; 2 Problem := [[-8 x + 7 z, 12 x y + 14 y , 5 y z + 18 x], 2 2 [-18 x y - 8 y, -5 x z + 16, -8 x - 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.82 memory used=68.9MB, alloc=56.3MB, time=1.20 N1 := 613 > GB := Basis(F, plex(op(vars))); 2 2 GB := [40 x - 147 x, 20 x y + 63 x, 10 y - 27 x, -8 x + 7 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=111.4MB, alloc=56.3MB, time=2.05 memory used=151.8MB, alloc=60.3MB, time=2.69 N2 := 327 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-8 x + 7 z, 12 x y + 14 y , 5 z y + 18 x, -18 x y - 8 y, -5 x z + 16, 2 2 -8 x - 11 z ] > J:=[op(GB),op(G)]; 2 2 J := [40 x - 147 x, 20 x y + 63 x, 10 y - 27 x, -8 x + 7 z, -18 x y - 8 y, 2 2 -5 x z + 16, -8 x - 11 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 1, 1/2, 2/3, 1/2, 5/12, 1/3, 7, 13, 13, 2, 2, 2, 2, 1, 3/7, 3/7, 9/14, 2/7, 3/14, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=162.4MB, alloc=60.3MB, time=2.90 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253249 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 x + 14 y , -x y - 19 z, -6 - x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 x - 11 z , -14 x y - 17 y, 5 x y - 12] > Problem := [F,G]; 2 2 Problem := [[-3 x + 14 y , -x y - 19 z, -6 - x], 2 2 [16 x - 11 z , -14 x y - 17 y, 5 x y - 12]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=58.6MB, alloc=68.3MB, time=1.06 memory used=109.9MB, alloc=68.3MB, time=1.93 memory used=151.2MB, alloc=92.3MB, time=3.10 N1 := 1463 > GB := Basis(F, plex(op(vars))); 2 GB := [x + 6, 7 y - 54, 19 z - 6 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=212.3MB, alloc=92.3MB, time=4.76 memory used=279.9MB, alloc=116.3MB, time=5.94 memory used=365.4MB, alloc=140.3MB, time=8.60 N2 := 1487 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-3 x + 14 y , -x y - 19 z, -6 - x, -11 z + 16 x , -14 x y - 17 y, 5 y x - 12] > J:=[op(GB),op(G)]; 2 2 2 J := [x + 6, 7 y - 54, 19 z - 6 y, -11 z + 16 x , -14 x y - 17 y, 5 y x - 12] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 1, 2/3, 1/3, 1/2, 5/12, 1/6, 6, 10, 10, 2, 2, 2, 2, 2/3, 2/3, 1/3, 1/3, 5/12, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=385.8MB, alloc=140.3MB, time=9.24 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253277 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-5 y z + 5 y, -2 y + 18 z , -6 x z + 3 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [7 + 11 y, 10 x y + 3 x z, 2 x y - 19 x z] > Problem := [F,G]; 2 2 2 Problem := [[-5 y z + 5 y, -2 y + 18 z , -6 x z + 3 y ], [7 + 11 y, 10 x y + 3 x z, 2 x y - 19 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.45 memory used=47.2MB, alloc=32.3MB, time=0.73 memory used=66.3MB, alloc=56.3MB, time=1.02 memory used=102.0MB, alloc=60.3MB, time=1.54 memory used=134.1MB, alloc=84.3MB, time=2.09 memory used=187.0MB, alloc=108.3MB, time=3.03 memory used=256.7MB, alloc=140.3MB, time=4.28 memory used=341.7MB, alloc=164.3MB, time=5.76 memory used=440.0MB, alloc=188.3MB, time=7.48 memory used=546.5MB, alloc=212.3MB, time=10.14 memory used=659.5MB, alloc=236.3MB, time=13.67 memory used=783.5MB, alloc=260.3MB, time=18.37 memory used=924.2MB, alloc=284.3MB, time=24.20 memory used=1088.8MB, alloc=308.3MB, time=31.04 memory used=1277.3MB, alloc=308.3MB, time=38.45 memory used=1465.9MB, alloc=308.3MB, time=45.87 memory used=1654.3MB, alloc=332.3MB, time=53.37 memory used=1866.9MB, alloc=332.3MB, time=61.68 memory used=2079.3MB, alloc=356.3MB, time=70.09 memory used=2315.8MB, alloc=380.3MB, time=79.43 N1 := 7773 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [2 x y - 9 y, y - 9 y, 2 z x - y , y z - y, -y + 9 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2420.2MB, alloc=380.3MB, time=81.81 memory used=2711.2MB, alloc=636.3MB, time=87.17 memory used=2979.4MB, alloc=660.3MB, time=94.49 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253577 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [9 + 17 y, -14 x z + 19 x, 12 z - 1] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [18 x y + 2 y , -18 y + 5, -15 x z - z ] > Problem := [F,G]; 2 Problem := [[9 + 17 y, -14 x z + 19 x, 12 z - 1], 2 2 2 [18 x y + 2 y , -18 y + 5, -15 x z - z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=25.9MB, alloc=32.3MB, time=0.48 memory used=48.3MB, alloc=32.3MB, time=0.85 memory used=68.4MB, alloc=56.3MB, time=1.21 memory used=107.9MB, alloc=80.3MB, time=1.94 memory used=162.4MB, alloc=80.3MB, time=3.65 N1 := 1643 > GB := Basis(F, plex(op(vars))); 2 GB := [x, 17 y + 9, 12 z - 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=214.0MB, alloc=80.3MB, time=4.96 memory used=246.9MB, alloc=108.3MB, time=5.57 N2 := 1153 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [17 y + 9, -14 x z + 19 x, 12 z - 1, 18 x y + 2 y , -18 y + 5, 2 -15 x z - z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x, 17 y + 9, 12 z - 1, 18 x y + 2 y , -18 y + 5, -15 x z - z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 1, 2, 2, 1/2, 1/2, 1/2, 1/3, 1/3, 1/3, 6, 8, 10, 2, 1, 2, 2, 1/2, 1/2, 1/3, 3/11, 4/11, 3/11, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=316.8MB, alloc=108.3MB, time=7.47 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253600 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [7 x z - 2, 14 x z - 10 z, -19 + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [8 x y + 19, 20 x z + 9 x, -16 x y - 8 y z] > Problem := [F,G]; Problem := [[7 x z - 2, 14 x z - 10 z, -19 + 19 y], [8 x y + 19, 20 x z + 9 x, -16 x y - 8 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.45 memory used=48.5MB, alloc=32.3MB, time=0.84 memory used=68.1MB, alloc=56.3MB, time=1.24 N1 := 609 > GB := Basis(F, plex(op(vars))); GB := [7 x - 5, y - 1, 5 z - 2] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.0MB, alloc=56.3MB, time=1.90 N2 := 483 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [7 z x - 2, 14 x z - 10 z, -19 + 19 y, 8 y x + 19, 20 x z + 9 x, -16 x y - 8 y z] > J:=[op(GB),op(G)]; J := [7 x - 5, y - 1, 5 z - 2, 8 y x + 19, 20 x z + 9 x, -16 x y - 8 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 1, 1, 5/6, 1/2, 2/3, 1/2, 1/3, 5/12, 6, 10, 9, 2, 1, 1, 1, 2/3, 1/2, 1/2, 5/12, 1/3, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=127.1MB, alloc=56.3MB, time=2.33 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253606 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-x y + 12 y, -16 x + 2 x z, -14 y z + 7 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [13 x z, 9 x z + 19 z, 5 x y + 11 x] > Problem := [F,G]; 2 Problem := [[-x y + 12 y, -16 x + 2 x z, -14 y z + 7 x], [13 x z, 9 x z + 19 z, 5 x y + 11 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.52 N1 := 285 > GB := Basis(F, plex(op(vars))); 2 GB := [x - 12 x, 192 y - x, x z - 96 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.3MB, alloc=32.3MB, time=0.86 N2 := 215 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-x y + 12 y, -16 x + 2 x z, -14 y z + 7 x, 13 x z, 9 x z + 19 z, 5 x y + 11 x] > J:=[op(GB),op(G)]; 2 J := [x - 12 x, 192 y - x, x z - 96 x, 13 x z, 9 x z + 19 z, 5 x y + 11 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 1, 1, 1, 1/2, 2/3, 8/13, 4/13, 5/13, 6, 11, 11, 2, 2, 1, 1, 1, 1/3, 1/2, 9/13, 2/13, 4/13, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=61.6MB, alloc=32.3MB, time=1.10 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428253609 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-20 + 16 y, 7 x z + 15 y, 7 x z - 13 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [18 y , -6 y - 14 x, 5 x y - 2 x z] > Problem := [F,G]; 2 Problem := [[-20 + 16 y, 7 x z + 15 y, 7 x z - 13 z ], 2 2 [18 y , -6 y - 14 x, 5 x y - 2 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.46 memory used=48.3MB, alloc=32.3MB, time=0.80 memory used=69.0MB, alloc=56.3MB, time=1.17 memory used=110.0MB, alloc=84.3MB, time=1.93 N1 := 1115 > GB := Basis(F, plex(op(vars))); 2 GB := [196 x + 975, 4 y - 5, -7 x + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=167.2MB, alloc=84.3MB, time=3.40 N2 := 357 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 -20 + 16 y, 7 z x + 15 y, 7 x z - 13 z , 18 y , -6 y - 14 x, 5 x y - 2 x z ] > J:=[op(GB),op(G)]; 2 2 2 J := [196 x + 975, 4 y - 5, -7 x + 13 z, 18 y , -6 y - 14 x, 5 x y - 2 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 2/3, 5/6, 1/2, 5/12, 5/12, 1/3, 6, 10, 10, 2, 2, 2, 1, 2/3, 2/3, 1/3, 5/12, 1/3, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=195.5MB, alloc=84.3MB, time=3.93 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314041 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [11 x + 9 x, -13 y z + 6, -11 x - 15 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [7 x z - 3, -14 y z - 4 y, 14 z - 18] > Problem := [F,G]; 2 2 Problem := [[11 x + 9 x, -13 y z + 6, -11 x - 15 x z], 2 [7 x z - 3, -14 y z - 4 y, 14 z - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.13 memory used=26.0MB, alloc=32.3MB, time=0.30 memory used=47.2MB, alloc=32.3MB, time=0.49 memory used=68.1MB, alloc=56.3MB, time=0.72 memory used=109.5MB, alloc=56.3MB, time=1.14 memory used=146.0MB, alloc=80.3MB, time=1.52 memory used=199.9MB, alloc=108.3MB, time=2.30 memory used=267.2MB, alloc=108.3MB, time=3.62 memory used=334.8MB, alloc=132.3MB, time=4.88 N1 := 2327 > GB := Basis(F, plex(op(vars))); 2 GB := [11 x + 9 x, 13 x y - 10 x, 5 x z - 3 x, 13 z y - 6] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=422.1MB, alloc=140.3MB, time=5.78 memory used=518.6MB, alloc=164.3MB, time=7.18 N2 := 1811 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [11 x + 9 x, -13 y z + 6, -11 x - 15 x z, 7 z x - 3, -14 y z - 4 y, 2 14 z - 18] > J:=[op(GB),op(G)]; 2 J := [11 x + 9 x, 13 x y - 10 x, 5 x z - 3 x, 13 z y - 6, 7 z x - 3, 2 -14 y z - 4 y, 14 z - 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 1, 2, 1/2, 1/3, 5/6, 5/12, 1/4, 5/12, 7, 12, 14, 2, 2, 1, 2, 4/7, 3/7, 5/7, 1/2, 2/7, 5/14, -2, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=568.0MB, alloc=164.3MB, time=7.90 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314048 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [4 y - 5 y z, -14 x z + 18 z , -5 z + 5 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-3 y + 5 z, 18 x z + 7, -14 z + 4 x] > Problem := [F,G]; 2 2 2 Problem := [[4 y - 5 y z, -14 x z + 18 z , -5 z + 5 x], 2 2 [-3 y + 5 z, 18 x z + 7, -14 z + 4 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.14 memory used=26.4MB, alloc=32.3MB, time=0.41 memory used=47.6MB, alloc=32.3MB, time=0.65 memory used=67.6MB, alloc=32.3MB, time=0.86 memory used=86.5MB, alloc=56.3MB, time=1.03 memory used=124.9MB, alloc=60.3MB, time=1.36 memory used=160.8MB, alloc=60.3MB, time=1.67 memory used=194.5MB, alloc=84.3MB, time=1.97 memory used=249.8MB, alloc=92.3MB, time=2.46 memory used=303.2MB, alloc=116.3MB, time=2.94 memory used=377.7MB, alloc=116.3MB, time=3.62 memory used=450.6MB, alloc=140.3MB, time=4.42 memory used=541.4MB, alloc=164.3MB, time=5.37 memory used=646.0MB, alloc=188.3MB, time=6.48 memory used=763.5MB, alloc=212.3MB, time=7.73 memory used=895.2MB, alloc=236.3MB, time=9.18 memory used=1035.2MB, alloc=260.3MB, time=10.76 memory used=1155.5MB, alloc=540.3MB, time=12.66 memory used=1296.9MB, alloc=564.3MB, time=15.27 memory used=1446.7MB, alloc=588.3MB, time=18.35 memory used=1607.4MB, alloc=612.3MB, time=21.88 memory used=1775.2MB, alloc=636.3MB, time=26.10 memory used=1966.9MB, alloc=660.3MB, time=30.89 memory used=2182.6MB, alloc=684.3MB, time=36.27 memory used=2422.2MB, alloc=708.3MB, time=42.23 memory used=2685.7MB, alloc=732.3MB, time=48.80 memory used=2973.2MB, alloc=732.3MB, time=57.94 memory used=3260.7MB, alloc=756.3MB, time=67.09 memory used=3572.1MB, alloc=756.3MB, time=76.91 memory used=3883.4MB, alloc=756.3MB, time=86.70 memory used=4194.8MB, alloc=756.3MB, time=97.85 memory used=4506.0MB, alloc=780.3MB, time=110.54 memory used=4841.3MB, alloc=780.3MB, time=123.73 memory used=5176.4MB, alloc=780.3MB, time=136.64 memory used=5511.3MB, alloc=804.3MB, time=150.06 memory used=5870.2MB, alloc=804.3MB, time=164.58 memory used=6228.9MB, alloc=828.3MB, time=178.78 memory used=6611.5MB, alloc=828.3MB, time=194.45 memory used=6994.1MB, alloc=852.3MB, time=210.01 N1 := 14591 > GB := Basis(F, plex(op(vars))); 2 2 3 GB := [49 x - 81 x, 28 x y - 45 x y, 16 y - 25 x y, 7 x z - 9 x, 2 2 -4 y + 5 y z, z - x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=7404.1MB, alloc=852.3MB, time=222.59 memory used=7855.1MB, alloc=852.3MB, time=230.85 memory used=8292.2MB, alloc=876.3MB, time=239.89 memory used=8713.3MB, alloc=900.3MB, time=254.69 memory used=9102.6MB, alloc=924.3MB, time=271.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314349 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-20 x z + 10 x, 10 y + 18 y, 17 y + 2] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-13 y + 9 z, 20 z - 17, 20 x - 13 x] > Problem := [F,G]; 2 2 Problem := [[-20 x z + 10 x, 10 y + 18 y, 17 y + 2], 2 2 2 [-13 y + 9 z, 20 z - 17, 20 x - 13 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.8MB, alloc=32.3MB, time=0.60 memory used=48.4MB, alloc=56.3MB, time=1.05 N1 := 545 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-20 x z + 10 x, 10 y + 18 y, 17 y + 2, -13 y + 9 z, 20 z - 17, 2 20 x - 13 x] > J:=[op(GB),op(G)]; 2 2 2 J := [1, -13 y + 9 z, 20 z - 17, 20 x - 13 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 12, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/3, 1/3, 1/4, 4, 4, 6, 2, 2, 2, 2, 1/4, 1/4, 1/2, 2/7, 1/7, 2/7, 4, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=72.6MB, alloc=56.3MB, time=1.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314351 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 y - 15 y, 17 x z + 11 z, -6 x - 19] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-8 y z - 13, -13 - 5 z, -15 x y + 17 y z] > Problem := [F,G]; 2 2 Problem := [[-3 y - 15 y, 17 x z + 11 z, -6 x - 19], [-8 y z - 13, -13 - 5 z, -15 x y + 17 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=48.4MB, alloc=32.3MB, time=0.89 memory used=67.1MB, alloc=56.3MB, time=1.33 N1 := 597 > GB := Basis(F, plex(op(vars))); 2 2 GB := [6 x + 19, y + 5 y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=104.9MB, alloc=60.3MB, time=1.99 N2 := 447 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-3 y - 15 y, 17 x z + 11 z, -6 x - 19, -8 y z - 13, -13 - 5 z, -15 x y + 17 y z] > J:=[op(GB),op(G)]; 2 2 J := [6 x + 19, y + 5 y, z, -8 y z - 13, -13 - 5 z, -15 x y + 17 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 1, 1/2, 1/2, 2/3, 1/4, 5/12, 5/12, 6, 9, 10, 2, 2, 2, 1, 1/3, 1/2, 2/3, 2/11, 5/11, 4/11, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=118.2MB, alloc=60.3MB, time=2.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314354 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-19 - 20 x, -3 y z + 9 z, -19 x + 12 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [12 y z + 2 z , -16 y + 20 z, -12 y z + 12 x] > Problem := [F,G]; Problem := [[-19 - 20 x, -3 y z + 9 z, -19 x + 12 z], 2 [12 y z + 2 z , -16 y + 20 z, -12 y z + 12 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.47 memory used=47.5MB, alloc=32.3MB, time=0.77 memory used=66.9MB, alloc=56.3MB, time=1.07 memory used=109.9MB, alloc=60.3MB, time=1.85 memory used=146.9MB, alloc=84.3MB, time=2.51 memory used=202.3MB, alloc=108.3MB, time=3.53 memory used=272.2MB, alloc=132.3MB, time=5.52 memory used=354.3MB, alloc=132.3MB, time=8.62 memory used=436.5MB, alloc=156.3MB, time=11.70 N1 := 2795 > GB := Basis(F, plex(op(vars))); GB := [20 x + 19, y - 3, 240 z + 361] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=511.3MB, alloc=156.3MB, time=13.42 memory used=627.6MB, alloc=188.3MB, time=15.49 memory used=754.6MB, alloc=212.3MB, time=19.85 N2 := 2561 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-19 - 20 x, -3 y z + 9 z, -19 x + 12 z, 12 y z + 2 z , -16 y + 20 z, -12 y z + 12 x] > J:=[op(GB),op(G)]; J := [ 2 20 x + 19, y - 3, 240 z + 361, 12 y z + 2 z , -16 y + 20 z, -12 y z + 12 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 1, 1, 2, 1/2, 2/3, 5/6, 1/4, 1/3, 7/12, 6, 10, 8, 2, 1, 1, 2, 1/3, 2/3, 2/3, 1/6, 1/3, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=858.8MB, alloc=212.3MB, time=23.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314381 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [12 x y - 20 z , z - 6, -13 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [12 x - z, 7 x y + 11 x z, 18 x z + 20 y] > Problem := [F,G]; Problem := [ 2 2 2 [12 x y - 20 z , z - 6, -13 y], [12 x - z, 7 x y + 11 x z, 18 x z + 20 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.7MB, alloc=32.3MB, time=0.48 memory used=48.0MB, alloc=32.3MB, time=0.78 memory used=67.7MB, alloc=56.3MB, time=1.08 memory used=108.4MB, alloc=60.3MB, time=1.66 memory used=146.7MB, alloc=60.3MB, time=2.20 memory used=182.2MB, alloc=84.3MB, time=2.73 memory used=231.2MB, alloc=84.3MB, time=3.50 memory used=288.4MB, alloc=116.3MB, time=4.58 memory used=363.0MB, alloc=140.3MB, time=5.89 memory used=453.7MB, alloc=164.3MB, time=7.66 memory used=560.1MB, alloc=188.3MB, time=9.60 memory used=679.3MB, alloc=212.3MB, time=11.70 memory used=802.1MB, alloc=492.3MB, time=13.96 memory used=937.8MB, alloc=516.3MB, time=17.38 memory used=1074.1MB, alloc=540.3MB, time=21.79 memory used=1221.5MB, alloc=564.3MB, time=26.74 memory used=1382.0MB, alloc=588.3MB, time=32.35 memory used=1553.6MB, alloc=612.3MB, time=39.12 memory used=1749.2MB, alloc=636.3MB, time=47.32 memory used=1968.8MB, alloc=660.3MB, time=56.17 memory used=2212.3MB, alloc=660.3MB, time=66.19 memory used=2455.7MB, alloc=684.3MB, time=75.92 memory used=2723.2MB, alloc=684.3MB, time=86.49 memory used=2990.5MB, alloc=684.3MB, time=96.96 memory used=3257.8MB, alloc=708.3MB, time=107.32 memory used=3549.1MB, alloc=708.3MB, time=118.54 memory used=3840.4MB, alloc=708.3MB, time=129.70 memory used=4131.7MB, alloc=732.3MB, time=140.86 memory used=4446.8MB, alloc=732.3MB, time=153.16 memory used=4761.9MB, alloc=756.3MB, time=165.38 memory used=5100.9MB, alloc=780.3MB, time=178.25 N1 := 12109 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [12 x y - 20 z , z - 6, -13 y, 12 x - z, 7 x y + 11 x z, 18 x z + 20 y] > J:=[op(GB),op(G)]; 2 J := [1, 12 x - z, 7 x y + 11 x z, 18 x z + 20 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 2, 2/3, 2/3, 5/6, 5/12, 1/3, 5/12, 4, 8, 6, 2, 2, 1, 1, 3/4, 1/2, 3/4, 4/7, 2/7, 3/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=5316.8MB, alloc=780.3MB, time=185.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314576 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-4 x y + 9, 11 x - 10 z, -20 x z + 4 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [9 x z - 18, -4 y - 17 z, -6 x + 16 z] > Problem := [F,G]; 2 Problem := [[-4 x y + 9, 11 x - 10 z, -20 x z + 4 z ], 2 [9 x z - 18, -4 y - 17 z, -6 x + 16 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.79 memory used=68.2MB, alloc=32.3MB, time=1.11 memory used=88.4MB, alloc=56.3MB, time=1.48 memory used=128.8MB, alloc=56.3MB, time=2.15 memory used=165.2MB, alloc=80.3MB, time=2.76 memory used=212.1MB, alloc=84.3MB, time=3.54 memory used=261.6MB, alloc=108.3MB, time=4.45 memory used=325.6MB, alloc=132.3MB, time=6.06 memory used=402.0MB, alloc=156.3MB, time=8.71 memory used=499.9MB, alloc=156.3MB, time=12.20 memory used=597.9MB, alloc=156.3MB, time=15.76 memory used=695.8MB, alloc=180.3MB, time=19.29 N1 := 3899 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 163 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-4 x y + 9, -10 z + 11 x, -20 x z + 4 z , 9 x z - 18, -4 y - 17 z, -6 x + 16 z] > J:=[op(GB),op(G)]; 2 J := [1, 9 x z - 18, -4 y - 17 z, -6 x + 16 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 2, 2, 5/6, 1/3, 5/6, 5/12, 1/6, 1/2, 4, 6, 5, 2, 1, 2, 1, 1/2, 1/4, 3/4, 2/7, 1/7, 3/7, 6, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=767.7MB, alloc=180.3MB, time=21.34 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314598 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-16 y z + z , -14 x y + 13 z , -5 x + 7] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-6 x y - 19 x z, -3 y + 10 y, 9 x y + 2 x] > Problem := [F,G]; 2 2 2 Problem := [[-16 y z + z , -14 x y + 13 z , -5 x + 7], 2 [-6 x y - 19 x z, -3 y + 10 y, 9 x y + 2 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=48.6MB, alloc=32.3MB, time=0.85 memory used=69.3MB, alloc=56.3MB, time=1.23 memory used=110.6MB, alloc=84.3MB, time=1.98 memory used=168.0MB, alloc=84.3MB, time=3.80 N1 := 1315 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [5 x - 7, -7 x y + 1664 y , -7 x y + 104 y z, -14 x y + 13 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=220.0MB, alloc=84.3MB, time=4.61 memory used=281.6MB, alloc=116.3MB, time=5.73 memory used=361.5MB, alloc=140.3MB, time=7.74 N2 := 1507 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-16 y z + z , -14 x y + 13 z , -5 x + 7, -6 x y - 19 x z, -3 y + 10 y, 9 x y + 2 x] > J:=[op(GB),op(G)]; 2 2 2 J := [5 x - 7, -7 x y + 1664 y , -7 x y + 104 y z, -14 x y + 13 z , 2 -6 x y - 19 x z, -3 y + 10 y, 9 x y + 2 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 5/6, 1/2, 1/2, 1/2, 1/3, 7, 15, 14, 2, 2, 2, 2, 6/7, 6/7, 3/7, 4/7, 9/14, 3/14, -3, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=407.6MB, alloc=140.3MB, time=9.36 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314608 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [x + 2 z , -12 x z + 6 x, 18 x + 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [12 y + 8 z , x y - 2 y , 12 y - 19 y] > Problem := [F,G]; 2 2 2 Problem := [[x + 2 z , -12 x z + 6 x, 18 x + 16 x], 2 2 2 2 [12 y + 8 z , x y - 2 y , 12 y - 19 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.52 memory used=48.8MB, alloc=32.3MB, time=0.99 memory used=69.2MB, alloc=56.3MB, time=1.44 N1 := 357 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 93 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [2 z + x , -12 x z + 6 x, 18 x + 16 x, 12 y + 8 z , x y - 2 y , 2 12 y - 19 y] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x, z , 12 y + 8 z , x y - 2 y , 12 y - 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 2, 2/3, 1/2, 1/2, 1/2, 5/12, 1/4, 5, 7, 9, 2, 1, 2, 2, 2/5, 3/5, 2/5, 2/9, 5/9, 2/9, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=91.3MB, alloc=56.3MB, time=1.85 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314611 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-19 z - 7, 5 x z + 16 y, -20 x z + 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [10 x y - 6 y, 5 x y + 14 z, -11 x + 9] > Problem := [F,G]; 2 Problem := [[-19 z - 7, 5 x z + 16 y, -20 x z + 9 z], 2 [10 x y - 6 y, 5 x y + 14 z, -11 x + 9]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.52 N1 := 239 > GB := Basis(F, plex(op(vars))); 2 GB := [20 x - 9, 77824 y + 567, 64 y + 9 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.9MB, alloc=32.3MB, time=0.93 N2 := 139 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-19 z - 7, 5 z x + 16 y, -20 x z + 9 z, 10 x y - 6 y, 5 y x + 14 z, 2 -11 x + 9] > J:=[op(GB),op(G)]; 2 J := [20 x - 9, 77824 y + 567, 9 z + 64 y, 10 x y - 6 y, 5 y x + 14 z, 2 -11 x + 9] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 5/6, 1/2, 2/3, 5/12, 1/3, 5/12, 6, 10, 10, 2, 2, 2, 1, 2/3, 2/3, 1/3, 1/3, 5/12, 1/6, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=66.9MB, alloc=32.3MB, time=1.22 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314612 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-15 y - 15 z , 2 x z + 10 y z, 6 x + 7 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-6 x z - 13 y z, 10 x - 20 y, -9 y - 16 z] > Problem := [F,G]; 2 2 2 2 Problem := [[-15 y - 15 z , 2 x z + 10 y z, 6 x + 7 y ], [-6 x z - 13 y z, 10 x - 20 y, -9 y - 16 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 N1 := 99 > GB := Basis(F, plex(op(vars))); 4 3 2 2 2 2 2 2 GB := [x , x + 5 x y, 7 y + 6 x , z x , x z + 5 y z, -6 x + 7 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=26.8MB, alloc=32.3MB, time=0.55 memory used=48.4MB, alloc=56.3MB, time=0.92 N2 := 235 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-15 y - 15 z , 2 x z + 10 y z, 7 y + 6 x , -6 x z - 13 y z, 10 x - 20 y, -9 y - 16 z] > J:=[op(GB),op(G)]; 4 3 2 2 2 2 2 2 J := [x , x + 5 x y, 7 y + 6 x , z x , x z + 5 y z, -6 x + 7 z , -6 x z - 13 y z, 10 x - 20 y, -9 y - 16 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 10, 2, 2, 2, 2, 2/3, 1, 2/3, 1/3, 1/2, 1/2, 9, 19, 20, 4, 4, 2, 2, 8/9, 2/3, 5/9, 1/2, 1/3, 7/18, -5, -10, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=49.4MB, alloc=56.3MB, time=0.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314613 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [10 x - z, -19 x + 6 y z, -4 x z - 12] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-8 x + 6 z, -4 y - 4 z, -16 x y - 9 z ] > Problem := [F,G]; 2 Problem := [[10 x - z, -19 x + 6 y z, -4 x z - 12], 2 2 2 [-8 x + 6 z, -4 y - 4 z, -16 x y - 9 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=32.1MB, alloc=40.3MB, time=0.59 memory used=59.9MB, alloc=40.3MB, time=1.04 memory used=85.7MB, alloc=64.3MB, time=1.44 memory used=131.8MB, alloc=68.3MB, time=2.14 memory used=174.1MB, alloc=92.3MB, time=2.82 memory used=238.5MB, alloc=100.3MB, time=3.82 memory used=303.3MB, alloc=124.3MB, time=4.87 memory used=389.7MB, alloc=124.3MB, time=6.25 memory used=472.1MB, alloc=148.3MB, time=7.54 memory used=569.3MB, alloc=148.3MB, time=9.10 memory used=658.5MB, alloc=404.3MB, time=10.56 memory used=761.2MB, alloc=428.3MB, time=12.19 memory used=879.6MB, alloc=452.3MB, time=14.14 memory used=1017.8MB, alloc=476.3MB, time=16.45 memory used=1174.4MB, alloc=500.3MB, time=19.16 memory used=1353.2MB, alloc=524.3MB, time=22.34 memory used=1529.3MB, alloc=548.3MB, time=25.65 memory used=1712.8MB, alloc=572.3MB, time=29.17 memory used=1915.7MB, alloc=596.3MB, time=32.80 memory used=2153.5MB, alloc=620.3MB, time=36.20 memory used=2360.4MB, alloc=644.3MB, time=40.13 memory used=2550.6MB, alloc=668.3MB, time=43.91 memory used=2713.8MB, alloc=692.3MB, time=47.71 memory used=2925.7MB, alloc=716.3MB, time=54.64 memory used=3138.6MB, alloc=740.3MB, time=62.28 memory used=3360.9MB, alloc=764.3MB, time=70.64 memory used=3594.8MB, alloc=788.3MB, time=79.74 memory used=3841.1MB, alloc=812.3MB, time=89.53 memory used=4100.5MB, alloc=836.3MB, time=100.14 memory used=4373.9MB, alloc=860.3MB, time=111.29 memory used=4656.9MB, alloc=884.3MB, time=123.44 memory used=4957.8MB, alloc=908.3MB, time=136.80 memory used=5282.6MB, alloc=932.3MB, time=151.05 memory used=5631.4MB, alloc=956.3MB, time=166.20 memory used=6004.2MB, alloc=980.3MB, time=182.42 memory used=6400.9MB, alloc=1004.3MB, time=199.49 memory used=6821.5MB, alloc=1028.3MB, time=217.54 memory used=7266.0MB, alloc=1052.3MB, time=236.47 memory used=7734.6MB, alloc=1076.3MB, time=256.32 memory used=8227.0MB, alloc=1100.3MB, time=276.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428314913 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [5 z - 17 z, -8 y z + 10 x, x z - 6 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-2 y - 6 z, -12 y z + z , -15 y - 12 x] > Problem := [F,G]; 2 Problem := [[5 z - 17 z, -8 y z + 10 x, x z - 6 y], 2 2 [-2 y - 6 z, -12 y z + z , -15 y - 12 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=47.4MB, alloc=32.3MB, time=0.76 memory used=67.8MB, alloc=32.3MB, time=1.05 memory used=86.8MB, alloc=56.3MB, time=1.33 memory used=124.8MB, alloc=60.3MB, time=1.90 memory used=160.2MB, alloc=84.3MB, time=2.48 memory used=215.0MB, alloc=108.3MB, time=3.45 memory used=288.9MB, alloc=140.3MB, time=4.77 memory used=378.0MB, alloc=164.3MB, time=6.34 memory used=480.4MB, alloc=188.3MB, time=8.16 memory used=594.5MB, alloc=468.3MB, time=10.45 memory used=713.2MB, alloc=492.3MB, time=13.92 memory used=840.7MB, alloc=516.3MB, time=17.99 memory used=978.8MB, alloc=540.3MB, time=23.09 memory used=1136.1MB, alloc=564.3MB, time=29.24 memory used=1317.4MB, alloc=588.3MB, time=36.30 memory used=1522.5MB, alloc=588.3MB, time=44.30 memory used=1727.7MB, alloc=588.3MB, time=52.73 memory used=1932.8MB, alloc=612.3MB, time=61.40 memory used=2161.9MB, alloc=612.3MB, time=71.82 memory used=2391.0MB, alloc=636.3MB, time=80.82 memory used=2644.1MB, alloc=636.3MB, time=91.42 N1 := 8615 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y, 5 z - 17 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2901.0MB, alloc=636.3MB, time=101.41 N2 := 529 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [5 z - 17 z, -8 y z + 10 x, z x - 6 y, -2 y - 6 z, -12 y z + z , 2 -15 y - 12 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x, y, 5 z - 17 z, -2 y - 6 z, -12 y z + z , -15 y - 12 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 2, 1/2, 5/6, 5/6, 1/4, 5/12, 7/12, 6, 9, 9, 2, 1, 2, 2, 1/3, 2/3, 1/2, 1/5, 2/5, 1/2, 4, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2929.0MB, alloc=636.3MB, time=101.98 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315029 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [20 x z - 14 x, 2 x z - 7 z , 12 x - 19 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [10 x + 11 y, -3 x y - 3 x z, 14 - 7 z] > Problem := [F,G]; 2 2 2 Problem := [[20 x z - 14 x, 2 x z - 7 z , 12 x - 19 z ], [10 x + 11 y, -3 x y - 3 x z, 14 - 7 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.3MB, alloc=32.3MB, time=0.76 memory used=68.1MB, alloc=56.3MB, time=1.10 memory used=111.0MB, alloc=56.3MB, time=1.86 memory used=148.2MB, alloc=80.3MB, time=2.51 memory used=202.5MB, alloc=108.3MB, time=3.49 memory used=269.6MB, alloc=132.3MB, time=5.16 memory used=347.9MB, alloc=132.3MB, time=7.86 memory used=426.2MB, alloc=156.3MB, time=10.54 memory used=528.6MB, alloc=156.3MB, time=13.99 N1 := 3507 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 197 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [20 x z - 14 x, 2 x z - 7 z , -19 z + 12 x , 11 y + 10 x, -3 x y - 3 x z, 14 - 7 z] > J:=[op(GB),op(G)]; 2 J := [x, z , 11 y + 10 x, -3 x y - 3 x z, 14 - 7 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 1, 2, 5/6, 1/3, 5/6, 7/12, 1/6, 1/2, 5, 8, 7, 2, 1, 1, 2, 3/5, 2/5, 3/5, 4/9, 2/9, 1/3, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=616.1MB, alloc=156.3MB, time=16.14 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315046 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [10 x - 13 z, 4 x + 9, 18 x + 15 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y - 2, 2 x - 11, x z - 9 z] > Problem := [F,G]; Problem := [ 2 2 2 2 2 2 [10 x - 13 z, 4 x + 9, 18 x + 15 y ], [-9 y - 2, 2 x - 11, x z - 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 69 > GB := Basis(F, plex(op(vars))); 2 2 GB := [4 x + 9, 10 y - 27, 26 z + 45] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=26.5MB, alloc=32.3MB, time=0.52 N2 := 175 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [10 x - 13 z, 4 x + 9, 18 x + 15 y , -9 y - 2, 2 x - 11, x z - 9 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [4 x + 9, 10 y - 27, 26 z + 45, -9 y - 2, 2 x - 11, x z - 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 12, 2, 2, 2, 1, 5/6, 1/3, 1/3, 5/12, 1/6, 1/4, 6, 7, 11, 2, 2, 2, 1, 1/2, 1/3, 1/3, 1/4, 1/6, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=42.2MB, alloc=32.3MB, time=0.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315046 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [10 x - 13 z, 4 x + 9, 18 x + 15 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y - 2, 2 x - 11, x z - 9 z] > Problem := [F,G]; Problem := [ 2 2 2 2 2 2 [10 x - 13 z, 4 x + 9, 18 x + 15 y ], [-9 y - 2, 2 x - 11, x z - 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 69 > GB := Basis(F, plex(op(vars))); 2 2 GB := [4 x + 9, 10 y - 27, 26 z + 45] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=26.6MB, alloc=32.3MB, time=0.51 N2 := 175 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [10 x - 13 z, 4 x + 9, 18 x + 15 y , -9 y - 2, 2 x - 11, x z - 9 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [4 x + 9, 10 y - 27, 26 z + 45, -9 y - 2, 2 x - 11, x z - 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 12, 2, 2, 2, 1, 5/6, 1/3, 1/3, 5/12, 1/6, 1/4, 6, 7, 11, 2, 2, 2, 1, 1/2, 1/3, 1/3, 1/4, 1/6, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=42.2MB, alloc=32.3MB, time=0.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315047 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-19 y - 20 z , -14 y - 5 y, -16 x + 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-12 + 7 y, 17 x + 16, 3 x z - z] > Problem := [F,G]; 2 2 2 2 Problem := [[-19 y - 20 z , -14 y - 5 y, -16 x + 20 z], 2 [-12 + 7 y, 17 x + 16, 3 x z - z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 N1 := 161 > GB := Basis(F, plex(op(vars))); 8 4 4 2 GB := [12544 x + 2375 x , -896 x + 475 y, -4 x + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.7MB, alloc=32.3MB, time=0.81 N2 := 195 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-19 y - 20 z , -14 y - 5 y, -16 x + 20 z, 7 y - 12, 17 x + 16, 3 x z - z] > J:=[op(GB),op(G)]; 8 4 4 2 2 J := [12544 x + 2375 x , -896 x + 475 y, -4 x + 5 z, 7 y - 12, 17 x + 16, 3 x z - z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/4, 1/3, 1/3, 6, 9, 19, 8, 8, 1, 1, 5/6, 1/3, 1/3, 1/2, 1/6, 1/4, 0, -8, -6] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=65.9MB, alloc=32.3MB, time=1.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315048 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [3 x + 4 z , -12 x y - 17 y , -17 y z + 9 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-13 x + 5 y z, 19 z - 11 y, 3 z + 2 y] > Problem := [F,G]; 2 2 2 Problem := [[3 x + 4 z , -12 x y - 17 y , -17 y z + 9 y], 2 2 2 [-13 x + 5 y z, 19 z - 11 y, 3 z + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.49 memory used=48.1MB, alloc=32.3MB, time=0.79 memory used=67.9MB, alloc=56.3MB, time=1.07 memory used=107.7MB, alloc=60.3MB, time=1.64 memory used=145.8MB, alloc=60.3MB, time=2.20 memory used=181.4MB, alloc=84.3MB, time=2.73 memory used=233.5MB, alloc=84.3MB, time=3.51 memory used=287.1MB, alloc=116.3MB, time=4.34 memory used=363.4MB, alloc=140.3MB, time=5.70 memory used=455.2MB, alloc=164.3MB, time=7.34 memory used=563.1MB, alloc=188.3MB, time=9.30 memory used=684.5MB, alloc=212.3MB, time=11.77 memory used=808.8MB, alloc=236.3MB, time=15.47 memory used=942.5MB, alloc=260.3MB, time=20.19 memory used=1091.0MB, alloc=284.3MB, time=25.83 memory used=1263.4MB, alloc=284.3MB, time=32.54 memory used=1435.9MB, alloc=308.3MB, time=39.35 memory used=1632.3MB, alloc=308.3MB, time=46.86 memory used=1828.9MB, alloc=332.3MB, time=54.25 N1 := 5961 > GB := Basis(F, plex(op(vars))); 2 2 2 2 GB := [289 x y + 108 y, 12 x y + 17 y , 17 y z - 9 y, 4 z + 3 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1918.9MB, alloc=332.3MB, time=55.88 memory used=2147.3MB, alloc=588.3MB, time=59.56 memory used=2393.3MB, alloc=612.3MB, time=64.18 memory used=2648.8MB, alloc=636.3MB, time=70.99 memory used=2880.4MB, alloc=660.3MB, time=79.66 memory used=3129.6MB, alloc=684.3MB, time=89.31 memory used=3403.0MB, alloc=708.3MB, time=99.83 N2 := 5961 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [4 z + 3 x , -12 x y - 17 y , -17 y z + 9 y, -13 x + 5 y z, 19 z - 11 y, 2 3 z + 2 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [289 x y + 108 y, 12 x y + 17 y , 17 y z - 9 y, 4 z + 3 x , 2 2 2 -13 x + 5 y z, 19 z - 11 y, 3 z + 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 1/2, 5/6, 5/6, 1/4, 7/12, 5/12, 7, 15, 15, 3, 2, 2, 2, 4/7, 6/7, 5/7, 2/7, 9/14, 5/14, -2, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=3657.0MB, alloc=708.3MB, time=108.50 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315164 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [10 x z + 16 x, -3 x y - 11 y, 17 x + 5 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-12 x - 5 y z, -6 z + 15, 5 y - 5 z ] > Problem := [F,G]; 2 2 Problem := [[10 x z + 16 x, -3 x y - 11 y, 17 x + 5 z ], 2 2 2 2 [-12 x - 5 y z, -6 z + 15, 5 y - 5 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=46.9MB, alloc=32.3MB, time=0.75 memory used=66.7MB, alloc=32.3MB, time=1.04 memory used=85.9MB, alloc=56.3MB, time=1.32 memory used=124.8MB, alloc=60.3MB, time=1.85 memory used=164.2MB, alloc=84.3MB, time=2.54 memory used=222.9MB, alloc=84.3MB, time=3.53 memory used=274.6MB, alloc=108.3MB, time=4.44 memory used=342.4MB, alloc=140.3MB, time=5.88 memory used=418.8MB, alloc=164.3MB, time=8.27 memory used=511.5MB, alloc=188.3MB, time=11.65 memory used=628.2MB, alloc=188.3MB, time=15.83 N1 := 3571 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [85 x + 64 x, y, 5 x z + 8 x, 5 z + 17 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=747.0MB, alloc=188.3MB, time=19.41 memory used=875.9MB, alloc=188.3MB, time=21.50 memory used=1003.7MB, alloc=212.3MB, time=23.83 memory used=1137.2MB, alloc=236.3MB, time=28.47 memory used=1283.7MB, alloc=260.3MB, time=34.14 N2 := 3077 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [10 x z + 16 x, -3 x y - 11 y, 5 z + 17 x , -12 x - 5 y z, -6 z + 15, 2 2 5 y - 5 z ] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [85 x + 64 x, y, 5 x z + 8 x, 5 z + 17 x , -12 x - 5 y z, -6 z + 15, 2 2 5 y - 5 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 1/2, 5/6, 5/12, 1/3, 5/12, 7, 12, 14, 3, 3, 2, 2, 4/7, 3/7, 5/7, 6/13, 3/13, 5/13, 0, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1311.9MB, alloc=260.3MB, time=34.99 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315200 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [8 x y + 12 y z, 6 x y - 19 y , 13 y + 10 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-4 x - 14 x y, -17 x y + 19 y , -14 y z] > Problem := [F,G]; 2 2 2 Problem := [[8 x y + 12 y z, 6 x y - 19 y , 13 y + 10 z ], 2 2 [-4 x - 14 x y, -17 x y + 19 y , -14 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 N1 := 99 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [y x , -6 x y + 19 y , 2 x y + 3 y z, 39 x y + 95 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=27.0MB, alloc=32.3MB, time=0.54 N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [8 x y + 12 y z, 6 x y - 19 y , 10 z + 13 y , -4 x - 14 x y, 2 -17 x y + 19 y , -14 y z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [y x , -6 x y + 19 y , 2 x y + 3 y z, 95 z + 39 y x, -4 x - 14 x y, 2 -17 x y + 19 y , -14 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 2/3, 1, 1/2, 5/13, 9/13, 3/13, 7, 16, 15, 3, 2, 2, 2, 6/7, 1, 3/7, 7/15, 2/3, 1/5, -3, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=43.0MB, alloc=32.3MB, time=0.79 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315201 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [5 x y + 2 y z, -2 x y + 11, -11 x + 17 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [y z - 13 x, 2 x y - 17 x, 18 z - 16 x] > Problem := [F,G]; 2 Problem := [[5 x y + 2 y z, -2 x y + 11, -11 x + 17 y z], 2 [y z - 13 x, 2 x y - 17 x, 18 z - 16 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.3MB, alloc=32.3MB, time=0.46 memory used=47.8MB, alloc=32.3MB, time=0.75 memory used=68.1MB, alloc=32.3MB, time=1.04 memory used=86.7MB, alloc=56.3MB, time=1.32 memory used=127.7MB, alloc=60.3MB, time=2.01 memory used=165.1MB, alloc=84.3MB, time=2.63 memory used=223.7MB, alloc=108.3MB, time=3.65 memory used=302.6MB, alloc=116.3MB, time=5.01 memory used=372.7MB, alloc=140.3MB, time=6.45 memory used=450.6MB, alloc=164.3MB, time=8.70 memory used=540.9MB, alloc=188.3MB, time=12.06 memory used=655.2MB, alloc=188.3MB, time=16.13 memory used=769.6MB, alloc=212.3MB, time=20.12 N1 := 3829 > GB := Basis(F, plex(op(vars))); 2 GB := [4 x + 85, 85 y + 22 x, 2 z + 5 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=913.1MB, alloc=212.3MB, time=23.33 N2 := 1017 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [5 x y + 2 y z, -2 x y + 11, -11 x + 17 y z, y z - 13 x, 2 x y - 17 x, 2 18 z - 16 x] > J:=[op(GB),op(G)]; J := 2 2 [4 x + 85, 85 y + 22 x, 2 z + 5 x, y z - 13 x, 2 x y - 17 x, 18 z - 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 1, 2, 1, 5/6, 2/3, 7/12, 1/2, 1/3, 6, 12, 10, 2, 2, 1, 2, 1, 1/2, 1/2, 7/12, 1/4, 1/4, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=973.3MB, alloc=212.3MB, time=24.81 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315226 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [20 x + 18 y, 11 - 12 z, -6 - 20 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [12 x - 17, -19 x z - 3, 19 y - 14 z] > Problem := [F,G]; Problem := [[20 x + 18 y, 11 - 12 z, -6 - 20 y], 2 2 [12 x - 17, -19 x z - 3, 19 y - 14 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=48.9MB, alloc=32.3MB, time=0.87 memory used=68.6MB, alloc=56.3MB, time=1.22 memory used=108.6MB, alloc=84.3MB, time=1.95 N1 := 1255 > GB := Basis(F, plex(op(vars))); GB := [100 x - 27, 10 y + 3, 12 z - 11] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=165.8MB, alloc=84.3MB, time=3.61 memory used=226.5MB, alloc=108.3MB, time=4.61 N2 := 687 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 x + 18 y, 11 - 12 z, -6 - 20 y, 12 x - 17, -19 x z - 3, 19 y - 14 z] > J:=[op(GB),op(G)]; 2 2 J := [100 x - 27, 10 y + 3, 12 z - 11, 12 x - 17, -19 x z - 3, 19 y - 14 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 9, 2, 2, 2, 1, 1/2, 1/2, 1/2, 1/4, 1/4, 1/4, 6, 8, 9, 2, 2, 2, 1, 1/2, 1/3, 1/2, 1/4, 1/6, 1/4, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=241.0MB, alloc=108.3MB, time=5.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315231 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-20 y - y z, 9 y + 20 x, -6 x z - 19 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [4 x z - 2 y , 15 x - 7 x y, 9 x y + 2 y z] > Problem := [F,G]; 2 2 Problem := [[-20 y - y z, 9 y + 20 x, -6 x z - 19 x], 2 2 [4 x z - 2 y , 15 x - 7 x y, 9 x y + 2 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.5MB, alloc=32.3MB, time=0.76 memory used=68.0MB, alloc=32.3MB, time=1.06 memory used=87.1MB, alloc=56.3MB, time=1.34 memory used=128.6MB, alloc=60.3MB, time=2.04 memory used=165.5MB, alloc=84.3MB, time=2.70 memory used=222.0MB, alloc=108.3MB, time=3.63 memory used=294.8MB, alloc=140.3MB, time=5.25 memory used=375.6MB, alloc=164.3MB, time=8.01 memory used=476.1MB, alloc=164.3MB, time=11.74 N1 := 2859 > GB := Basis(F, plex(op(vars))); GB := [ 2 2 32000 x + 361 x, 120 x y - 19 x, 9 y + 20 x, 6 x z + 19 x, 9 y z - 400 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=578.4MB, alloc=164.3MB, time=14.47 memory used=678.6MB, alloc=444.3MB, time=15.97 memory used=813.7MB, alloc=468.3MB, time=18.29 memory used=961.2MB, alloc=492.3MB, time=20.91 memory used=1117.7MB, alloc=516.3MB, time=25.48 memory used=1271.3MB, alloc=540.3MB, time=31.61 memory used=1448.8MB, alloc=564.3MB, time=38.70 memory used=1650.7MB, alloc=588.3MB, time=46.52 N2 := 4635 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-20 y - y z, 9 y + 20 x, -6 x z - 19 x, 4 x z - 2 y , 15 x - 7 x y, 9 x y + 2 y z] > J:=[op(GB),op(G)]; 2 2 J := [32000 x + 361 x, 120 x y - 19 x, 9 y + 20 x, 6 x z + 19 x, 2 2 9 y z - 400 x, 4 x z - 2 y , 15 x - 7 x y, 9 x y + 2 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 5/6, 5/6, 2/3, 7/12, 7/12, 1/3, 8, 18, 16, 2, 2, 2, 1, 1, 3/4, 1/2, 3/4, 7/16, 1/4, -4, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1697.1MB, alloc=588.3MB, time=48.10 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315281 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-20 x + 20 z, 8 y z - y, -9 y z + 17] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [17 x - 19 x, 7 x z - 3, 5 x y + 18 x z] > Problem := [F,G]; Problem := [[-20 x + 20 z, 8 y z - y, -9 y z + 17], 2 [17 x - 19 x, 7 x z - 3, 5 x y + 18 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=46.5MB, alloc=32.3MB, time=0.74 memory used=66.1MB, alloc=56.3MB, time=1.03 memory used=108.8MB, alloc=60.3MB, time=1.76 memory used=146.1MB, alloc=84.3MB, time=2.40 memory used=201.8MB, alloc=108.3MB, time=3.49 memory used=268.4MB, alloc=108.3MB, time=5.64 memory used=332.5MB, alloc=132.3MB, time=7.64 N1 := 2135 > GB := Basis(F, plex(op(vars))); GB := [8 x - 1, 9 y - 136, 8 z - 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 437 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-20 x + 20 z, 8 y z - y, -9 y z + 17, 17 x - 19 x, 7 z x - 3, 5 x y + 18 x z] > J:=[op(GB),op(G)]; 2 J := [8 x - 1, 9 y - 136, 8 z - 1, 17 x - 19 x, 7 z x - 3, 5 x y + 18 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 1, 2/3, 1/2, 5/6, 1/2, 1/3, 5/12, 6, 9, 9, 2, 2, 1, 1, 2/3, 1/3, 1/2, 1/2, 1/6, 1/4, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=387.4MB, alloc=132.3MB, time=8.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315290 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [19 + y, -13 x y - 11 z, -15 z + 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [10 x z, 5 x z + 15 z , 11 x + 8 x y] > Problem := [F,G]; 2 Problem := [[19 + y, -13 x y - 11 z, -15 z + 5 y], 2 2 [10 x z, 5 x z + 15 z , 11 x + 8 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.46 memory used=47.5MB, alloc=32.3MB, time=0.77 memory used=69.0MB, alloc=56.3MB, time=1.16 memory used=110.6MB, alloc=60.3MB, time=1.89 memory used=145.6MB, alloc=84.3MB, time=2.69 memory used=196.2MB, alloc=108.3MB, time=4.39 N1 := 1481 > GB := Basis(F, plex(op(vars))); 2 GB := [9633 x + 121, y + 19, -247 x + 11 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 141 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 y + 19, -13 x y - 11 z, -15 z + 5 y, 10 x z, 5 x z + 15 z , 11 x + 8 x y] > J:=[op(GB),op(G)]; J := [ 2 2 2 9633 x + 121, y + 19, -247 x + 11 z, 10 x z, 5 x z + 15 z , 11 x + 8 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 2, 2/3, 2/3, 2/3, 5/13, 4/13, 5/13, 6, 10, 10, 2, 2, 1, 2, 5/6, 1/3, 1/2, 6/13, 2/13, 4/13, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=224.7MB, alloc=108.3MB, time=4.89 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315295 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [11 x z + 4 z, 16 y - 20 y z, -13 x z + 6 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-19 y z + 10 z , -6 z - 8 z, -x y - 10 z] > Problem := [F,G]; 2 Problem := [[11 x z + 4 z, 16 y - 20 y z, -13 x z + 6 x], 2 2 [-19 y z + 10 z , -6 z - 8 z, -x y - 10 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=47.1MB, alloc=32.3MB, time=0.75 memory used=67.6MB, alloc=56.3MB, time=1.13 memory used=108.7MB, alloc=60.3MB, time=1.86 memory used=144.5MB, alloc=84.3MB, time=2.52 memory used=197.3MB, alloc=108.3MB, time=3.62 memory used=261.4MB, alloc=132.3MB, time=5.82 memory used=346.3MB, alloc=132.3MB, time=8.88 N1 := 2701 > GB := Basis(F, plex(op(vars))); 2 2 GB := [11 x + 4 x, 165 x y + 104 y , 33 x + 26 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=431.8MB, alloc=132.3MB, time=11.32 memory used=526.6MB, alloc=164.3MB, time=12.94 N2 := 1445 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [11 x z + 4 z, 16 y - 20 y z, -13 x z + 6 x, -19 y z + 10 z , -6 z - 8 z, -x y - 10 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [11 x + 4 x, 165 x y + 104 y , 26 z + 33 x, -19 y z + 10 z , -6 z - 8 z, -x y - 10 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 1/2, 1/2, 1, 1/3, 1/3, 3/4, 6, 11, 11, 2, 2, 2, 2, 2/3, 1/2, 2/3, 5/12, 1/3, 1/2, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=602.3MB, alloc=164.3MB, time=15.33 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315311 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [18 x z - 13 y , -16 - 5 x, 13 y z + 6 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x y + 1, 20 z - 13 z, 11 y] > Problem := [F,G]; Problem := [ 2 2 [18 x z - 13 y , -16 - 5 x, 13 y z + 6 y], [-7 x y + 1, 20 z - 13 z, 11 y] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.4MB, alloc=32.3MB, time=0.51 memory used=48.0MB, alloc=32.3MB, time=0.87 memory used=66.7MB, alloc=56.3MB, time=1.30 N1 := 585 > GB := Basis(F, plex(op(vars))); 3 2 GB := [5 x + 16, 845 y - 1728 y, 65 y + 288 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=104.4MB, alloc=60.3MB, time=1.91 N2 := 507 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [18 z x - 13 y , -16 - 5 x, 13 y z + 6 y, -7 x y + 1, 20 z - 13 z, 11 y] > J:=[op(GB),op(G)]; 3 2 2 J := [5 x + 16, 845 y - 1728 y, 65 y + 288 z, -7 x y + 1, 20 z - 13 z, 11 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 1, 2, 2, 1/2, 2/3, 1/2, 1/4, 5/12, 1/3, 6, 8, 11, 3, 1, 3, 2, 1/3, 2/3, 1/3, 1/6, 5/12, 1/4, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=126.1MB, alloc=60.3MB, time=2.36 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315314 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 x + 10 z, -5 x , -9 y z + 16 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-11 x + 7 x y, -12 x z + 19, -9 x + 17 y] > Problem := [F,G]; 2 2 Problem := [[19 x + 10 z, -5 x , -9 y z + 16 z ], 2 2 [-11 x + 7 x y, -12 x z + 19, -9 x + 17 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.16 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=48.6MB, alloc=32.3MB, time=0.85 memory used=68.4MB, alloc=56.3MB, time=1.21 memory used=108.9MB, alloc=84.3MB, time=2.11 N1 := 1039 > GB := Basis(F, plex(op(vars))); 2 GB := [x , y x, 10 z + 19 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 139 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [10 z + 19 x, -5 x , -9 y z + 16 z , -11 x + 7 x y, -12 x z + 19, 2 -9 x + 17 y] > J:=[op(GB),op(G)]; 2 2 2 J := [x , y x, 10 z + 19 x, -11 x + 7 x y, -12 x z + 19, -9 x + 17 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 5/6, 1/2, 1/2, 1/2, 1/4, 1/3, 6, 11, 11, 2, 2, 1, 1, 1, 1/2, 1/3, 7/12, 1/4, 1/6, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=150.8MB, alloc=84.3MB, time=3.01 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315317 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 y z - 19 y, -10 y - 13 z, -20 y + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [9 + 18 y, 11 y z - 16 y, 17 x y + 7 x] > Problem := [F,G]; 2 2 Problem := [[19 y z - 19 y, -10 y - 13 z, -20 y + 19 y], [9 + 18 y, 11 y z - 16 y, 17 x y + 7 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.51 N1 := 189 > GB := Basis(F, plex(op(vars))); GB := [y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [19 y z - 19 y, -10 y - 13 z, -20 y + 19 y, 9 + 18 y, 11 y z - 16 y, 17 x y + 7 x] > J:=[op(GB),op(G)]; J := [y, z, 9 + 18 y, 11 y z - 16 y, 17 x y + 7 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 1, 2, 1, 1/6, 1, 1/2, 1/6, 3/4, 1/4, 5, 7, 7, 2, 1, 1, 1, 1/5, 4/5, 2/5, 1/4, 5/8, 1/4, 3, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=40.6MB, alloc=32.3MB, time=0.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315318 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [4 x + 5, -14 x y - 17 z, -7 y + 4 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-16 z - 14, -6 x y + 6 x z, x] > Problem := [F,G]; Problem := 2 2 2 [[4 x + 5, -14 x y - 17 z, -7 y + 4 z], [-16 z - 14, -6 x y + 6 x z, x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.49 memory used=48.1MB, alloc=32.3MB, time=0.85 N1 := 255 > GB := Basis(F, plex(op(vars))); 2 2 GB := [4 x + 5, 8 x y + 17 y , 14 y x + 17 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=67.5MB, alloc=32.3MB, time=1.18 memory used=87.1MB, alloc=56.3MB, time=1.49 N2 := 143 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [4 x + 5, -14 x y - 17 z, -7 y + 4 z, -16 z - 14, -6 x y + 6 x z, x] > J:=[op(GB),op(G)]; 2 2 2 J := [4 x + 5, 8 x y + 17 y , 14 y x + 17 z, -16 z - 14, -6 x y + 6 x z, x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 1/2, 2/3, 5/11, 3/11, 4/11, 6, 11, 11, 2, 2, 2, 2, 5/6, 1/2, 1/2, 6/11, 4/11, 3/11, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=95.6MB, alloc=56.3MB, time=1.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315319 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [6 x z - 15 z , 14 x + 20 z , 17 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-20 x y + 20 z , -11 - 8 z, -10 z + 18] > Problem := [F,G]; 2 2 2 Problem := [[6 x z - 15 z , 14 x + 20 z , 17 x], 2 2 [-20 x y + 20 z , -11 - 8 z, -10 z + 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=56.3MB, time=0.86 memory used=91.0MB, alloc=56.3MB, time=1.61 memory used=126.1MB, alloc=80.3MB, time=2.56 N1 := 1251 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 163 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 6 x z - 15 z , 14 x + 20 z , 17 x, -20 x y + 20 z , -11 - 8 z, -10 z + 18 ] > J:=[op(GB),op(G)]; 2 2 2 J := [x, z , -20 x y + 20 z , -11 - 8 z, -10 z + 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 2, 1, 2, 2/3, 1/6, 5/6, 1/3, 1/12, 1/2, 5, 7, 8, 2, 1, 1, 2, 2/5, 1/5, 4/5, 2/9, 1/9, 4/9, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=166.5MB, alloc=80.3MB, time=3.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315323 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [7 x - 3 x, -19 y z + 19 z, 16 x y + 6 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-17 x y + 18, -10 y + 9 y z, -16 x z + 11 y ] > Problem := [F,G]; 2 2 Problem := [[7 x - 3 x, -19 y z + 19 z, 16 x y + 6 z ], 2 2 [-17 x y + 18, -10 y + 9 y z, -16 x z + 11 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.2MB, alloc=32.3MB, time=0.44 memory used=47.7MB, alloc=32.3MB, time=0.74 memory used=68.4MB, alloc=32.3MB, time=1.05 memory used=88.8MB, alloc=56.3MB, time=1.41 memory used=130.1MB, alloc=60.3MB, time=2.12 memory used=166.7MB, alloc=84.3MB, time=2.78 memory used=219.7MB, alloc=108.3MB, time=4.47 N1 := 1595 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [7 x - 3 x, x y - x y, y z - z, 3 z + 8 y x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=292.7MB, alloc=108.3MB, time=6.08 memory used=371.8MB, alloc=116.3MB, time=7.44 memory used=447.6MB, alloc=140.3MB, time=9.21 N2 := 1595 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [7 x - 3 x, -19 y z + 19 z, 16 x y + 6 z , -17 x y + 18, -10 y + 9 y z, 2 -16 x z + 11 y ] > J:=[op(GB),op(G)]; 2 2 2 J := [7 x - 3 x, x y - x y, y z - z, 3 z + 8 y x, -17 x y + 18, 2 2 -10 y + 9 y z, -16 x z + 11 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 2/3, 5/6, 2/3, 5/12, 1/2, 5/12, 7, 15, 15, 3, 2, 2, 2, 5/7, 6/7, 4/7, 1/2, 4/7, 5/14, -2, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=506.2MB, alloc=140.3MB, time=10.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315334 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-8 y + 16 z , -12 x y - 14 y, 5 x - 13 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [5 x z - 11, 10 x - 15 y , 20 + 4 z] > Problem := [F,G]; 2 2 2 2 Problem := [[-8 y + 16 z , -12 x y - 14 y, 5 x - 13 y ], 2 2 [5 x z - 11, 10 x - 15 y , 20 + 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.49 memory used=49.8MB, alloc=32.3MB, time=0.87 memory used=70.2MB, alloc=56.3MB, time=1.22 memory used=111.6MB, alloc=56.3MB, time=1.93 memory used=148.7MB, alloc=80.3MB, time=2.57 memory used=204.4MB, alloc=108.3MB, time=3.55 memory used=274.1MB, alloc=132.3MB, time=5.32 memory used=356.5MB, alloc=132.3MB, time=8.08 memory used=435.0MB, alloc=156.3MB, time=10.82 memory used=537.4MB, alloc=156.3MB, time=14.30 N1 := 3521 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 2 GB := [6 x + 7 x , 6 x y + 7 y, -5 x + 13 y , -5 x + 26 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=640.7MB, alloc=156.3MB, time=17.43 memory used=712.5MB, alloc=164.3MB, time=18.69 N2 := 1291 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [-8 y + 16 z , -12 x y - 14 y, -13 y + 5 x , 5 z x - 11, 10 x - 15 y , 20 + 4 z] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [6 x + 7 x , 6 x y + 7 y, -5 x + 13 y , -5 x + 26 z , 5 z x - 11, 2 2 10 x - 15 y , 20 + 4 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 5/12, 1/4, 7, 12, 14, 3, 3, 2, 2, 6/7, 3/7, 3/7, 1/2, 2/7, 3/14, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=786.7MB, alloc=164.3MB, time=20.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315356 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-7 x + 18 y , -x y - 18 y , 20 x y + 12 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-20 y - 7 z, -14, 10 x + 16 x] > Problem := [F,G]; 2 2 2 Problem := [[-7 x + 18 y , -x y - 18 y , 20 x y + 12 x], 2 2 [-20 y - 7 z, -14, 10 x + 16 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.3MB, alloc=32.3MB, time=0.54 N1 := 327 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.8MB, alloc=56.3MB, time=0.94 N2 := 45 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 -7 x + 18 y , -x y - 18 y , 20 x y + 12 x, -20 y - 7 z, -14, 10 x + 16 x ] > J:=[op(GB),op(G)]; 2 2 2 J := [x, y , -20 y - 7 z, -14, 10 x + 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 2, 2, 1, 2/3, 2/3, 1/6, 6/11, 5/11, 1/11, 5, 5, 7, 2, 2, 2, 1, 2/5, 2/5, 1/5, 3/8, 1/4, 1/8, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=48.6MB, alloc=56.3MB, time=0.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315357 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-19 x + 10, 17 x y - 6 z, -x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [20 x y + 14 y , -16 z - 20 z, -4 x z - 4] > Problem := [F,G]; 2 Problem := [[-19 x + 10, 17 x y - 6 z, -x], 2 2 [20 x y + 14 y , -16 z - 20 z, -4 x z - 4]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=48.5MB, alloc=32.3MB, time=0.87 memory used=67.7MB, alloc=56.3MB, time=1.20 memory used=108.1MB, alloc=56.3MB, time=2.21 N1 := 981 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 145 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [-19 x + 10, 17 y x - 6 z, -x, 20 x y + 14 y , -16 z - 20 z, -4 x z - 4] > J:=[op(GB),op(G)]; 2 2 J := [1, 20 x y + 14 y , -16 z - 20 z, -4 x z - 4] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 5/6, 1/3, 1/2, 5/12, 1/4, 1/3, 4, 5, 6, 2, 1, 2, 2, 1/2, 1/4, 1/2, 2/7, 2/7, 3/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=131.6MB, alloc=56.3MB, time=2.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315359 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [18 x y - 11 x, -20 x + 4 z , -14 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 y z - 18 z, 11 x y - 6 z , -x z - 13 y ] > Problem := [F,G]; 2 2 Problem := [[18 x y - 11 x, -20 x + 4 z , -14 x], 2 2 [6 y z - 18 z, 11 x y - 6 z , -x z - 13 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.48 memory used=48.1MB, alloc=32.3MB, time=0.78 memory used=69.1MB, alloc=32.3MB, time=1.11 memory used=90.0MB, alloc=56.3MB, time=1.47 memory used=132.5MB, alloc=60.3MB, time=2.22 memory used=170.8MB, alloc=84.3MB, time=2.92 memory used=227.5MB, alloc=108.3MB, time=3.99 memory used=296.8MB, alloc=132.3MB, time=6.05 memory used=381.3MB, alloc=132.3MB, time=9.09 memory used=466.0MB, alloc=156.3MB, time=12.00 N1 := 2755 > GB := Basis(F, plex(op(vars))); 2 GB := [x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 193 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [18 x y - 11 x, -20 x + 4 z , -14 x, 6 y z - 18 z, -6 z + 11 y x, 2 -x z - 13 y ] > J:=[op(GB),op(G)]; 2 2 2 J := [x, z , 6 y z - 18 z, -6 z + 11 y x, -x z - 13 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 5/6, 2/3, 2/3, 1/2, 1/3, 5/12, 5, 10, 9, 2, 1, 2, 2, 3/5, 3/5, 4/5, 1/3, 1/3, 5/9, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=499.2MB, alloc=156.3MB, time=12.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315373 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-15 x z - z , -8 x - 12 x, -18 z - 10 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [10 x y - 9 z , 15 x - 19 y z, 4 x + 14 z ] > Problem := [F,G]; 2 2 2 Problem := [[-15 x z - z , -8 x - 12 x, -18 z - 10 y], 2 2 2 2 [10 x y - 9 z , 15 x - 19 y z, 4 x + 14 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.49 memory used=47.6MB, alloc=32.3MB, time=0.80 memory used=67.4MB, alloc=32.3MB, time=1.08 memory used=86.7MB, alloc=56.3MB, time=1.39 memory used=126.1MB, alloc=60.3MB, time=1.96 memory used=164.2MB, alloc=84.3MB, time=2.54 memory used=209.2MB, alloc=84.3MB, time=3.25 memory used=268.4MB, alloc=116.3MB, time=4.34 memory used=348.4MB, alloc=140.3MB, time=5.64 memory used=447.3MB, alloc=164.3MB, time=7.30 memory used=551.8MB, alloc=188.3MB, time=10.02 memory used=658.1MB, alloc=212.3MB, time=14.68 memory used=786.7MB, alloc=212.3MB, time=20.60 memory used=915.3MB, alloc=236.3MB, time=26.18 N1 := 3897 > GB := Basis(F, plex(op(vars))); 2 2 GB := [2 x + 3 x, 2 x y + 3 y, 4 y + 3645 y, 27 x z - y, 2 y z - 45 y, 2 9 z + 5 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1063.2MB, alloc=236.3MB, time=29.61 memory used=1232.4MB, alloc=516.3MB, time=32.45 memory used=1422.8MB, alloc=540.3MB, time=35.80 memory used=1636.7MB, alloc=564.3MB, time=39.33 memory used=1871.5MB, alloc=588.3MB, time=43.07 memory used=2122.6MB, alloc=612.3MB, time=47.15 memory used=2395.9MB, alloc=636.3MB, time=52.00 memory used=2686.6MB, alloc=660.3MB, time=57.72 memory used=2967.6MB, alloc=684.3MB, time=63.25 memory used=3257.5MB, alloc=708.3MB, time=68.85 memory used=3548.1MB, alloc=732.3MB, time=74.62 memory used=3824.7MB, alloc=756.3MB, time=82.18 memory used=4064.8MB, alloc=780.3MB, time=91.19 memory used=4309.1MB, alloc=804.3MB, time=100.82 memory used=4564.9MB, alloc=828.3MB, time=111.16 memory used=4833.7MB, alloc=852.3MB, time=122.28 memory used=5107.1MB, alloc=876.3MB, time=134.74 memory used=5402.6MB, alloc=900.3MB, time=148.09 memory used=5722.0MB, alloc=924.3MB, time=162.62 memory used=6065.4MB, alloc=948.3MB, time=178.11 memory used=6432.6MB, alloc=972.3MB, time=194.58 memory used=6823.9MB, alloc=996.3MB, time=211.98 memory used=7239.0MB, alloc=1020.3MB, time=230.46 memory used=7678.1MB, alloc=1044.3MB, time=249.61 memory used=8141.1MB, alloc=1068.3MB, time=269.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315673 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [10 y, -3 x z + 12 y , 7 z - 11 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [20 x z + 7 z , 7 y , -8 x - 15 z ] > Problem := [F,G]; Problem := 2 2 2 2 2 2 [[10 y, -3 x z + 12 y , 7 z - 11 x], [20 x z + 7 z , 7 y , -8 x - 15 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.51 N1 := 265 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , y, z x, 7 z - 11 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.9MB, alloc=32.3MB, time=0.90 N2 := 129 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [10 y, -3 x z + 12 y , 7 z - 11 x, 20 x z + 7 z , 7 y , -8 x - 15 z ] > J:=[op(GB),op(G)]; 2 2 2 2 2 2 J := [x , y, z x, 7 z - 11 x, 20 x z + 7 z , 7 y , -8 x - 15 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 1/2, 2/3, 1/3, 1/4, 5/12, 7, 11, 13, 2, 2, 2, 2, 5/7, 2/7, 4/7, 5/13, 2/13, 5/13, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=66.4MB, alloc=32.3MB, time=1.16 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315674 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-7 y + 8, -4 z + 10 y, -4 z + 20 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [5 z + 7 x, -4 y - 15 z, 12 x y - 4 x] > Problem := [F,G]; 2 2 2 Problem := [[-7 y + 8, -4 z + 10 y, -4 z + 20 y], 2 [5 z + 7 x, -4 y - 15 z, 12 x y - 4 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.48 memory used=47.5MB, alloc=32.3MB, time=0.77 memory used=67.5MB, alloc=32.3MB, time=1.05 memory used=86.7MB, alloc=56.3MB, time=1.33 memory used=132.2MB, alloc=60.3MB, time=2.12 memory used=172.9MB, alloc=84.3MB, time=2.81 memory used=233.6MB, alloc=108.3MB, time=3.88 memory used=311.3MB, alloc=132.3MB, time=5.27 memory used=398.4MB, alloc=164.3MB, time=7.23 memory used=492.4MB, alloc=188.3MB, time=9.91 memory used=597.6MB, alloc=212.3MB, time=13.71 memory used=726.8MB, alloc=212.3MB, time=18.38 memory used=855.9MB, alloc=212.3MB, time=23.13 memory used=985.1MB, alloc=236.3MB, time=27.80 memory used=1138.2MB, alloc=236.3MB, time=33.31 N1 := 5113 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 153 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-7 y + 8, -4 z + 10 y, -4 z + 20 y, 5 z + 7 x, -4 y - 15 z, 12 x y - 4 x] > J:=[op(GB),op(G)]; 2 J := [1, 5 z + 7 x, -4 y - 15 z, 12 x y - 4 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/3, 5/6, 2/3, 1/4, 5/12, 1/3, 4, 6, 5, 2, 1, 1, 2, 1/2, 1/2, 1/2, 3/7, 2/7, 2/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1209.6MB, alloc=236.3MB, time=35.34 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315712 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-16 x - 7 y, -15 y + 20 z , 16 y z + 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [7 x - 8, 15 x - 3 z, -20 + 6 x] > Problem := [F,G]; 2 2 Problem := [[-16 x - 7 y, -15 y + 20 z , 16 y z + 20 z], 2 2 [7 x - 8, 15 x - 3 z, -20 + 6 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=49.1MB, alloc=32.3MB, time=0.86 memory used=69.1MB, alloc=56.3MB, time=1.23 memory used=109.2MB, alloc=84.3MB, time=1.99 memory used=164.6MB, alloc=84.3MB, time=3.69 N1 := 1579 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [64 x - 35 x , 7 y + 16 x, 64 x z - 35 z, -192 x + 49 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=218.2MB, alloc=84.3MB, time=5.00 N2 := 375 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-16 x - 7 y, -15 y + 20 z , 16 y z + 20 z, 7 x - 8, 15 x - 3 z, -20 + 6 x] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [64 x - 35 x , 7 y + 16 x, 64 x z - 35 z, -192 x + 49 z , 7 x - 8, 2 15 x - 3 z, -20 + 6 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 2, 2, 2, 2/3, 1/2, 1/2, 1/3, 1/4, 1/3, 7, 11, 13, 3, 3, 1, 2, 1, 1/7, 3/7, 4/7, 1/14, 2/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=236.4MB, alloc=84.3MB, time=5.33 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315718 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [10 x y - 7, -10 y - 4 y, 3 x z + 20 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-17 x y - 6 x z, 20 y z, -4 x y + 15 z] > Problem := [F,G]; 2 2 Problem := [[10 x y - 7, -10 y - 4 y, 3 x z + 20 z ], [-17 x y - 6 x z, 20 y z, -4 x y + 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.16 memory used=26.1MB, alloc=32.3MB, time=0.45 memory used=48.4MB, alloc=32.3MB, time=0.81 memory used=68.5MB, alloc=56.3MB, time=1.16 memory used=108.7MB, alloc=84.3MB, time=1.97 N1 := 1175 > GB := Basis(F, plex(op(vars))); 2 GB := [4 x + 7, 5 y + 2, 80 z - 21 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=164.0MB, alloc=84.3MB, time=3.38 N2 := 583 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [10 y x - 7, -10 y - 4 y, 3 x z + 20 z , -17 x y - 6 x z, 20 y z, -4 x y + 15 z] > J:=[op(GB),op(G)]; 2 J := [4 x + 7, 5 y + 2, 80 z - 21 z, -17 x y - 6 x z, 20 y z, -4 x y + 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 1, 2, 2, 2/3, 5/6, 2/3, 5/13, 6/13, 5/13, 6, 11, 10, 2, 1, 1, 2, 1/2, 2/3, 2/3, 4/13, 4/13, 5/13, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=208.3MB, alloc=84.3MB, time=4.19 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315722 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 y - 15 x, 16 x + 15 x y, 11 + 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-11 x z + 11 y, 14 x y + 14 x, 5 x y - 10 x z] > Problem := [F,G]; 2 2 Problem := [[-18 y - 15 x, 16 x + 15 x y, 11 + 5 y], [-11 x z + 11 y, 14 x y + 14 x, 5 x y - 10 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.3MB, alloc=32.3MB, time=0.43 memory used=48.3MB, alloc=32.3MB, time=0.76 memory used=67.9MB, alloc=56.3MB, time=1.11 N1 := 691 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.6MB, alloc=60.3MB, time=2.02 N2 := 93 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-18 y - 15 x, 16 x + 15 x y, 5 y + 11, -11 x z + 11 y, 14 x y + 14 x, 5 x y - 10 x z] > J:=[op(GB),op(G)]; J := [1, -11 x z + 11 y, 14 x y + 14 x, 5 x y - 10 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 1, 5/6, 1, 1/3, 2/3, 1/2, 1/6, 4, 8, 6, 2, 1, 1, 1, 3/4, 3/4, 1/2, 5/7, 3/7, 2/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=109.8MB, alloc=60.3MB, time=2.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315724 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-14 x z + 14 y, 4 x + 10, -10 x y - 7 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y z - 5 z, -13 x - 13 z, -17 y - 10 x] > Problem := [F,G]; 2 2 Problem := [[-14 x z + 14 y, 4 x + 10, -10 x y - 7 z ], 2 2 [-9 y z - 5 z, -13 x - 13 z, -17 y - 10 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.45 memory used=47.8MB, alloc=32.3MB, time=0.74 memory used=68.2MB, alloc=32.3MB, time=1.02 memory used=89.0MB, alloc=56.3MB, time=1.38 memory used=131.0MB, alloc=60.3MB, time=2.09 memory used=168.8MB, alloc=84.3MB, time=2.74 memory used=224.4MB, alloc=108.3MB, time=4.26 N1 := 1801 > GB := Basis(F, plex(op(vars))); memory used=295.1MB, alloc=108.3MB, time=6.49 2 2 GB := [2 x + 5, -25 x y + 7 y , 2 x y + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=372.7MB, alloc=116.3MB, time=7.70 N2 := 961 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-14 x z + 14 y, 4 x + 10, -10 x y - 7 z , -9 y z - 5 z, -13 x - 13 z, 2 -17 y - 10 x] > J:=[op(GB),op(G)]; 2 2 2 J := [2 x + 5, -25 x y + 7 y , 2 y x + 5 z, -9 y z - 5 z, -13 x - 13 z, 2 -17 y - 10 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 5/6, 2/3, 2/3, 5/12, 1/3, 5/12, 6, 12, 12, 2, 2, 2, 1, 5/6, 2/3, 1/2, 5/12, 5/12, 1/3, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=424.7MB, alloc=116.3MB, time=9.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315734 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-11 y - 14 y, 5 x z - 20 z , 15 x + 18 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [11 + 6 y, -15 x y - 11 z, 17 y + 9 z] > Problem := [F,G]; 2 2 2 Problem := [[-11 y - 14 y, 5 x z - 20 z , 15 x + 18 x y], [11 + 6 y, -15 x y - 11 z, 17 y + 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.46 memory used=47.1MB, alloc=32.3MB, time=0.76 memory used=68.5MB, alloc=56.3MB, time=1.15 memory used=109.9MB, alloc=60.3MB, time=1.85 memory used=145.3MB, alloc=84.3MB, time=2.70 N1 := 1433 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [55 x - 84 x , 5 x + 6 x y, 11 y + 14 y, -x z + 4 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=198.4MB, alloc=84.3MB, time=4.38 memory used=253.6MB, alloc=84.3MB, time=5.18 memory used=308.8MB, alloc=108.3MB, time=6.16 memory used=380.9MB, alloc=132.3MB, time=8.37 N2 := 1433 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-11 y - 14 y, 5 x z - 20 z , 15 x + 18 x y, 6 y + 11, -15 x y - 11 z, 9 z + 17 y] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [55 x - 84 x , 5 x + 6 x y, 11 y + 14 y, -x z + 4 z , 6 y + 11, -15 x y - 11 z, 9 z + 17 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 2, 1/2, 5/6, 1/2, 1/3, 1/2, 1/3, 7, 12, 13, 3, 3, 2, 2, 4/7, 5/7, 3/7, 3/7, 3/7, 2/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=386.8MB, alloc=132.3MB, time=8.52 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315742 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-6, 10 x + 12 z , 5 z - 14] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [5 x + 19 z, -6 x y + 10 x, -14 x z - 12 y z] > Problem := [F,G]; 2 2 2 Problem := [[-6, 10 x + 12 z , 5 z - 14], [5 x + 19 z, -6 x y + 10 x, -14 x z - 12 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.52 N1 := 357 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.7MB, alloc=32.3MB, time=0.91 N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := 2 2 2 [-6, 10 x + 12 z , 5 z - 14, 19 z + 5 x, -6 x y + 10 x, -14 x z - 12 y z] > J:=[op(GB),op(G)]; J := [1, 19 z + 5 x, -6 x y + 10 x, -14 x z - 12 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 9, 2, 2, 1, 2, 2/3, 1/3, 2/3, 5/11, 2/11, 5/11, 4, 7, 5, 2, 1, 1, 1, 3/4, 1/2, 1/2, 4/7, 2/7, 3/7, 3, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=58.7MB, alloc=32.3MB, time=1.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315744 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [16 z + 3, -15 z + 12 y, 20 y - 15 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [20 x z - 4 y, -4 x + 6 z, -19 y - 7 z ] > Problem := [F,G]; 2 2 2 Problem := [[16 z + 3, -15 z + 12 y, 20 y - 15 y z], 2 2 [20 x z - 4 y, -4 x + 6 z, -19 y - 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.77 memory used=67.3MB, alloc=56.3MB, time=1.05 memory used=106.4MB, alloc=60.3MB, time=1.60 memory used=143.1MB, alloc=84.3MB, time=2.15 memory used=198.5MB, alloc=84.3MB, time=2.94 memory used=251.4MB, alloc=108.3MB, time=3.72 memory used=326.0MB, alloc=116.3MB, time=4.86 memory used=399.0MB, alloc=140.3MB, time=5.92 memory used=490.8MB, alloc=164.3MB, time=7.31 memory used=603.5MB, alloc=188.3MB, time=9.29 memory used=729.9MB, alloc=212.3MB, time=11.57 memory used=871.3MB, alloc=236.3MB, time=14.15 memory used=1007.1MB, alloc=516.3MB, time=17.36 memory used=1155.8MB, alloc=540.3MB, time=22.09 memory used=1311.8MB, alloc=564.3MB, time=27.84 memory used=1484.7MB, alloc=588.3MB, time=34.48 memory used=1681.6MB, alloc=612.3MB, time=42.08 memory used=1902.4MB, alloc=612.3MB, time=50.49 memory used=2123.2MB, alloc=636.3MB, time=59.03 memory used=2368.0MB, alloc=660.3MB, time=68.41 N1 := 6973 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 55 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [16 z + 3, -15 z + 12 y, 20 y - 15 y z, 20 x z - 4 y, -4 x + 6 z, 2 2 -19 y - 7 z ] > J:=[op(GB),op(G)]; 2 2 J := [1, 20 x z - 4 y, -4 x + 6 z, -19 y - 7 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 1/3, 2/3, 1, 1/6, 5/12, 1/2, 4, 7, 5, 2, 1, 2, 2, 1/2, 1/2, 3/4, 2/7, 2/7, 3/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2532.9MB, alloc=660.3MB, time=73.77 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315820 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-4 x z + 10 y, -3 z + 15 y, 19 x - 16] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-15 x y - 12 y z, -12 + 10 y, -10 x z + 17 y] > Problem := [F,G]; 2 2 Problem := [[-4 x z + 10 y, -3 z + 15 y, 19 x - 16], [-15 x y - 12 y z, -12 + 10 y, -10 x z + 17 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.7MB, alloc=32.3MB, time=0.77 memory used=69.1MB, alloc=56.3MB, time=1.17 memory used=111.0MB, alloc=60.3MB, time=1.88 memory used=149.2MB, alloc=84.3MB, time=2.55 memory used=206.7MB, alloc=108.3MB, time=3.61 memory used=278.0MB, alloc=108.3MB, time=5.95 memory used=343.1MB, alloc=132.3MB, time=8.30 N1 := 2217 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x - 16, 95 y - 64 y, -95 x y + 32 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=434.3MB, alloc=140.3MB, time=10.16 N2 := 675 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-4 x z + 10 y, -3 z + 15 y, 19 x - 16, -15 x y - 12 y z, -12 + 10 y, -10 x z + 17 y] > J:=[op(GB),op(G)]; 2 2 J := [19 x - 16, 95 y - 64 y, -95 x y + 32 z, -15 x y - 12 y z, -12 + 10 y, -10 x z + 17 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 2, 2/3, 5/6, 2/3, 1/3, 1/2, 1/3, 6, 12, 11, 2, 2, 2, 1, 2/3, 5/6, 1/2, 1/3, 7/12, 1/4, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=452.9MB, alloc=140.3MB, time=10.64 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315831 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [5 y z - 6 y, -9 x + 20 y, -18 y - 5 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [18 x z + 5 z , 11 - 18 z, 6 y z - 13 x] > Problem := [F,G]; 2 2 Problem := [[5 y z - 6 y, -9 x + 20 y, -18 y - 5 y], 2 [18 x z + 5 z , 11 - 18 z, 6 y z - 13 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.0MB, alloc=32.3MB, time=0.74 memory used=68.0MB, alloc=56.3MB, time=1.10 memory used=109.9MB, alloc=60.3MB, time=1.81 memory used=145.8MB, alloc=84.3MB, time=2.47 memory used=196.8MB, alloc=108.3MB, time=4.06 N1 := 1753 > GB := Basis(F, plex(op(vars))); 4 2 2 2 2 GB := [81 x + 50 x , -9 x + 20 y, 5 x z - 6 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=269.1MB, alloc=108.3MB, time=5.78 memory used=351.0MB, alloc=140.3MB, time=7.38 N2 := 1031 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [5 y z - 6 y, -9 x + 20 y, -18 y - 5 y, 18 x z + 5 z , 11 - 18 z, 6 y z - 13 x] > J:=[op(GB),op(G)]; 4 2 2 2 2 2 J := [81 x + 50 x , -9 x + 20 y, 5 x z - 6 x , 18 x z + 5 z , 11 - 18 z, 6 y z - 13 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/4, 1/2, 5/12, 6, 11, 14, 4, 4, 1, 2, 5/6, 1/3, 2/3, 7/12, 1/6, 5/12, 0, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=370.3MB, alloc=140.3MB, time=7.89 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315839 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-18 x y + 17 x, -3 y + 14 y z, x y + 10 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-17 - 8 z, 7 y - 13 z, 9 x z - 15 y ] > Problem := [F,G]; 2 Problem := [[-18 x y + 17 x, -3 y + 14 y z, x y + 10 y], 2 2 [-17 - 8 z, 7 y - 13 z, 9 x z - 15 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.1MB, alloc=32.3MB, time=0.75 memory used=68.6MB, alloc=56.3MB, time=1.14 memory used=110.5MB, alloc=60.3MB, time=1.85 memory used=147.1MB, alloc=84.3MB, time=2.55 memory used=198.6MB, alloc=108.3MB, time=4.15 N1 := 1471 > GB := Basis(F, plex(op(vars))); 2 GB := [x + 10 x, 17 x + 180 y, 84 x z - 17 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=271.4MB, alloc=116.3MB, time=5.43 memory used=351.2MB, alloc=140.3MB, time=6.81 memory used=443.9MB, alloc=164.3MB, time=9.61 N2 := 1801 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-18 x y + 17 x, -3 y + 14 y z, x y + 10 y, -17 - 8 z, 7 y - 13 z, 2 9 x z - 15 y ] > J:=[op(GB),op(G)]; 2 2 J := [x + 10 x, 180 y + 17 x, 84 x z - 17 x, -17 - 8 z, 7 y - 13 z, 2 9 x z - 15 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 1, 1/2, 5/6, 2/3, 1/3, 7/12, 1/3, 6, 11, 10, 2, 2, 2, 1, 2/3, 1/2, 2/3, 1/2, 1/4, 1/3, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=477.2MB, alloc=164.3MB, time=10.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315850 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [4 x - 7 z, 13 x z + 11 z , 7 y - 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-13 x - 11 z , 20 x z - 16 z , -3 x - 14 x y] > Problem := [F,G]; 2 2 2 Problem := [[4 x - 7 z, 13 x z + 11 z , 7 y - 17 z], 2 2 2 2 [-13 x - 11 z , 20 x z - 16 z , -3 x - 14 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.46 memory used=48.1MB, alloc=32.3MB, time=0.76 memory used=68.4MB, alloc=32.3MB, time=1.04 memory used=89.4MB, alloc=56.3MB, time=1.46 memory used=130.5MB, alloc=56.3MB, time=2.18 memory used=164.5MB, alloc=80.3MB, time=3.10 N1 := 1183 > GB := Basis(F, plex(op(vars))); 4 3 2 2 2 GB := [44 x + 91 x , -68 x + 49 y , -4 x + 7 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=206.4MB, alloc=80.3MB, time=3.91 N2 := 289 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [4 x - 7 z, 13 x z + 11 z , 7 y - 17 z, -13 x - 11 z , 20 x z - 16 z , 2 -3 x - 14 x y] > J:=[op(GB),op(G)]; 4 3 2 2 2 2 2 J := [44 x + 91 x , -68 x + 49 y , -4 x + 7 z, -13 x - 11 z , 2 2 20 x z - 16 z , -3 x - 14 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 1/3, 5/6, 1/2, 1/6, 7/12, 6, 11, 14, 4, 4, 2, 2, 1, 1/3, 1/2, 2/3, 1/6, 1/3, 1, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=225.4MB, alloc=84.3MB, time=4.24 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428315854 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [15 x - 9 x z, -18 x z - 20 y, 17 z + 19 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-18 x z + 15 y , -8 y + 19 z , 9 x y - 13 y] > Problem := [F,G]; 2 2 Problem := [[15 x - 9 x z, -18 x z - 20 y, 17 z + 19 x], 2 2 2 [-18 x z + 15 y , -8 y + 19 z , 9 x y - 13 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.16 memory used=26.6MB, alloc=32.3MB, time=0.44 memory used=47.6MB, alloc=32.3MB, time=0.71 memory used=67.6MB, alloc=32.3MB, time=1.01 memory used=86.7MB, alloc=56.3MB, time=1.29 memory used=125.8MB, alloc=60.3MB, time=1.86 memory used=163.2MB, alloc=84.3MB, time=2.41 memory used=213.6MB, alloc=84.3MB, time=3.19 memory used=272.6MB, alloc=116.3MB, time=4.24 memory used=349.3MB, alloc=140.3MB, time=5.57 memory used=442.4MB, alloc=164.3MB, time=7.17 memory used=551.4MB, alloc=188.3MB, time=9.05 memory used=673.3MB, alloc=212.3MB, time=11.31 memory used=805.9MB, alloc=492.3MB, time=13.74 memory used=946.2MB, alloc=516.3MB, time=17.09 memory used=1084.4MB, alloc=540.3MB, time=21.25 memory used=1231.9MB, alloc=564.3MB, time=26.10 memory used=1391.1MB, alloc=588.3MB, time=31.77 memory used=1562.3MB, alloc=612.3MB, time=38.49 memory used=1757.6MB, alloc=636.3MB, time=46.26 memory used=1976.7MB, alloc=660.3MB, time=54.90 memory used=2219.8MB, alloc=684.3MB, time=64.47 memory used=2486.9MB, alloc=684.3MB, time=74.79 memory used=2753.9MB, alloc=684.3MB, time=85.27 memory used=3020.9MB, alloc=684.3MB, time=95.75 memory used=3287.9MB, alloc=708.3MB, time=106.22 memory used=3578.8MB, alloc=708.3MB, time=117.41 memory used=3869.6MB, alloc=708.3MB, time=128.61 memory used=4160.5MB, alloc=732.3MB, time=139.92 memory used=4475.2MB, alloc=732.3MB, time=152.03 memory used=4789.8MB, alloc=756.3MB, time=164.14 memory used=5128.4MB, alloc=780.3MB, time=177.19 N1 := 12025 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [425 x + 171 x , 3 x + 2 y, -5 x + 3 x z, 17 z + 19 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=5501.1MB, alloc=780.3MB, time=187.32 memory used=5918.6MB, alloc=804.3MB, time=200.28 memory used=6283.7MB, alloc=828.3MB, time=216.96 memory used=6672.9MB, alloc=852.3MB, time=234.65 N2 := 6375 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [15 x - 9 x z, -18 x z - 20 y, 17 z + 19 x, -18 x z + 15 y , 2 2 -8 y + 19 z , 9 x y - 13 y] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [425 x + 171 x , 3 x + 2 y, -5 x + 3 x z, 17 z + 19 x, -18 x z + 15 y , 2 2 -8 y + 19 z , 9 x y - 13 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 2/3, 5/6, 1/2, 5/12, 5/12, 7, 14, 15, 3, 3, 2, 2, 6/7, 4/7, 4/7, 4/7, 5/14, 2/7, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=7003.8MB, alloc=852.3MB, time=248.97 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316125 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [x y + 15 z , -15 y z - 17, -10 x y + 15 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-19 y z + z , -x + 19 y, 16 x + 11 y] > Problem := [F,G]; 2 Problem := [[x y + 15 z , -15 y z - 17, -10 x y + 15 x z], 2 [-19 y z + z , -x + 19 y, 16 x + 11 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.4MB, alloc=32.3MB, time=0.55 memory used=47.8MB, alloc=32.3MB, time=0.86 memory used=68.5MB, alloc=32.3MB, time=1.18 memory used=87.9MB, alloc=56.3MB, time=1.52 memory used=127.4MB, alloc=60.3MB, time=2.22 memory used=166.8MB, alloc=84.3MB, time=2.99 memory used=224.0MB, alloc=108.3MB, time=4.01 memory used=297.2MB, alloc=108.3MB, time=6.31 N1 := 1839 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x + 680, 20 y + 3 x, x + 10 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=363.7MB, alloc=108.3MB, time=8.29 N2 := 159 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [15 z + y x, -15 y z - 17, -10 x y + 15 x z, -19 y z + z , -x + 19 y, 11 y + 16 x] > J:=[op(GB),op(G)]; 2 2 J := [9 x + 680, 20 y + 3 x, 10 z + x, -19 y z + z , -x + 19 y, 11 y + 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 10, 2, 1, 1, 2, 2/3, 1, 2/3, 5/12, 1/2, 5/12, 6, 11, 8, 2, 2, 1, 2, 5/6, 2/3, 1/3, 5/12, 1/3, 1/4, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=374.8MB, alloc=108.3MB, time=8.49 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316134 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [12 x z - z, -12 x z, 8 y + 5 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-10 - 7 x, 2 z - 9 z, 3 x + 9 x] > Problem := [F,G]; Problem := 2 2 2 [[12 x z - z, -12 x z, 8 y + 5 x], [-10 - 7 x, 2 z - 9 z, 3 x + 9 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); N1 := 155 > GB := Basis(F, plex(op(vars))); 2 GB := [8 y + 5 x, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=32.7MB, alloc=40.3MB, time=0.69 N2 := 145 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [12 x z - z, -12 x z, 8 y + 5 x, -10 - 7 x, 2 z - 9 z, 3 x + 9 x] > J:=[op(GB),op(G)]; 2 2 2 J := [8 y + 5 x, z, -10 - 7 x, 2 z - 9 z, 3 x + 9 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 5/6, 1/6, 1/2, 6/13, 1/13, 5/13, 5, 6, 8, 2, 2, 2, 2, 3/5, 1/5, 2/5, 4/9, 1/9, 1/3, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=36.2MB, alloc=40.3MB, time=0.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316135 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [9 x + 16 y, 7 x - 3 y, -17 y z + 13 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-18 x + 3 y z, 5 y - 14 z , 20 x y - 13 z] > Problem := [F,G]; 2 Problem := [[9 x + 16 y, 7 x - 3 y, -17 y z + 13 x], 2 2 2 [-18 x + 3 y z, 5 y - 14 z , 20 x y - 13 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.56 memory used=47.8MB, alloc=32.3MB, time=0.86 memory used=68.2MB, alloc=32.3MB, time=1.17 memory used=88.1MB, alloc=56.3MB, time=1.49 memory used=128.4MB, alloc=60.3MB, time=2.20 memory used=169.5MB, alloc=84.3MB, time=2.98 memory used=224.1MB, alloc=84.3MB, time=3.95 memory used=278.2MB, alloc=108.3MB, time=5.03 memory used=352.2MB, alloc=140.3MB, time=6.56 memory used=443.3MB, alloc=164.3MB, time=8.19 memory used=550.4MB, alloc=188.3MB, time=10.10 memory used=667.1MB, alloc=212.3MB, time=13.42 memory used=789.1MB, alloc=236.3MB, time=17.55 memory used=922.7MB, alloc=260.3MB, time=22.87 memory used=1070.8MB, alloc=284.3MB, time=29.23 memory used=1242.8MB, alloc=284.3MB, time=36.59 memory used=1414.8MB, alloc=308.3MB, time=43.81 memory used=1610.8MB, alloc=308.3MB, time=52.07 memory used=1806.7MB, alloc=308.3MB, time=60.26 memory used=2002.6MB, alloc=332.3MB, time=68.49 memory used=2222.5MB, alloc=332.3MB, time=77.80 memory used=2442.7MB, alloc=356.3MB, time=86.72 N1 := 7715 > GB := Basis(F, plex(op(vars))); 2 GB := [27 x + 112 x, 3 y - 7 x, 119 x z - 39 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2538.5MB, alloc=356.3MB, time=89.17 memory used=2816.0MB, alloc=636.3MB, time=94.68 memory used=3095.9MB, alloc=660.3MB, time=104.29 memory used=3360.2MB, alloc=684.3MB, time=115.82 memory used=3648.5MB, alloc=708.3MB, time=128.90 N2 := 5697 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [9 x + 16 y, -3 y + 7 x, -17 z y + 13 x, -18 x + 3 y z, -14 z + 5 y , 20 y x - 13 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [27 x + 112 x, 3 y - 7 x, 119 x z - 39 x, -18 x + 3 y z, -14 z + 5 y , 20 y x - 13 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 11, 2, 2, 2, 2, 5/6, 1, 2/3, 5/12, 1/2, 1/3, 6, 13, 11, 2, 2, 2, 2, 5/6, 2/3, 2/3, 7/12, 1/3, 1/3, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=3905.9MB, alloc=708.3MB, time=139.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316294 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-4 x - 18 z , -4 x - 18, -6 x y + 13 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-15 x + y, -15 x z - 6 z, 16 z + 20 y] > Problem := [F,G]; 2 2 2 Problem := [[-4 x - 18 z , -4 x - 18, -6 x y + 13 z], 2 2 [-15 x + y, -15 x z - 6 z, 16 z + 20 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.22 memory used=26.1MB, alloc=32.3MB, time=0.56 memory used=48.1MB, alloc=32.3MB, time=0.92 N1 := 225 > GB := Basis(F, plex(op(vars))); 2 2 GB := [2 x + 9, 162 y + 169, -6 x y + 13 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=68.2MB, alloc=32.3MB, time=1.33 memory used=87.5MB, alloc=32.3MB, time=1.66 N2 := 185 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-4 x - 18 z , -4 x - 18, -6 x y + 13 z, -15 x + y, -15 x z - 6 z, 2 16 z + 20 y] > J:=[op(GB),op(G)]; 2 2 2 J := [2 x + 9, 162 y + 169, -6 x y + 13 z, -15 x + y, -15 x z - 6 z, 2 16 z + 20 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 5/6, 1/2, 2/3, 5/12, 1/4, 5/12, 6, 11, 12, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 1/3, 1/3, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=104.5MB, alloc=32.3MB, time=1.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316297 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-4 x y - 12 y , -17 x z - 11, -13 y - 5 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [6 x y - 12 z, 2 x y - 7 x, 4 x - 8 y ] > Problem := [F,G]; 2 2 2 Problem := [[-4 x y - 12 y , -17 x z - 11, -13 y - 5 z ], 2 2 [6 x y - 12 z, 2 x y - 7 x, 4 x - 8 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.20 memory used=26.3MB, alloc=32.3MB, time=0.53 memory used=47.6MB, alloc=32.3MB, time=0.84 memory used=68.4MB, alloc=56.3MB, time=1.19 memory used=110.9MB, alloc=60.3MB, time=2.00 memory used=149.9MB, alloc=84.3MB, time=3.00 N1 := 837 > GB := Basis(F, plex(op(vars))); 4 3 GB := [3757 x + 5445, 3 y + x, -221 x + 495 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=206.4MB, alloc=84.3MB, time=4.08 memory used=267.3MB, alloc=108.3MB, time=5.56 N2 := 889 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-4 x y - 12 y , -17 x z - 11, -13 y - 5 z , 6 x y - 12 z, 2 x y - 7 x, 2 2 4 x - 8 y ] > J:=[op(GB),op(G)]; 4 3 J := [3757 x + 5445, 3 y + x, -221 x + 495 z, 6 x y - 12 z, 2 x y - 7 x, 2 2 4 x - 8 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 5/6, 5/6, 1/2, 1/2, 1/2, 1/4, 6, 12, 14, 4, 4, 2, 1, 1, 2/3, 1/3, 7/12, 1/3, 1/6, 1, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=277.1MB, alloc=108.3MB, time=5.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316305 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-10 y + 11 z, -19 x y - 16, 2 - 3 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-10 z + 13 y, 10 x - 14, -6 x y - 10 x z] > Problem := [F,G]; Problem := [[-10 y + 11 z, -19 x y - 16, 2 - 3 x], 2 2 [-10 z + 13 y, 10 x - 14, -6 x y - 10 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.52 memory used=49.2MB, alloc=32.3MB, time=0.93 memory used=68.6MB, alloc=56.3MB, time=1.28 N1 := 777 > GB := Basis(F, plex(op(vars))); GB := [3 x - 2, 19 y + 24, 209 z + 240] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.0MB, alloc=56.3MB, time=2.26 memory used=148.0MB, alloc=84.3MB, time=2.95 N2 := 693 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-10 y + 11 z, -19 x y - 16, 2 - 3 x, -10 z + 13 y, 10 x - 14, -6 x y - 10 x z] > J:=[op(GB),op(G)]; J := [ 2 2 3 x - 2, 19 y + 24, 209 z + 240, -10 z + 13 y, 10 x - 14, -6 x y - 10 x z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 1, 2, 2/3, 2/3, 1/2, 5/12, 1/3, 1/4, 6, 9, 9, 2, 2, 1, 2, 1/2, 1/2, 1/2, 1/3, 1/4, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=172.2MB, alloc=84.3MB, time=3.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316309 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-3 x - y, y z, 9 x + 14 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [19 y z - 5 z, 12 y - 7 z, 12 x z - 11 y ] > Problem := [F,G]; Problem := 2 2 2 [[-3 x - y, y z, 9 x + 14 x], [19 y z - 5 z, 12 y - 7 z, 12 x z - 11 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.51 memory used=48.0MB, alloc=56.3MB, time=0.90 N1 := 451 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x + 14 x, 3 y - 14 x, z x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=88.6MB, alloc=60.3MB, time=1.65 N2 := 451 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-3 x - y, y z, 9 x + 14 x, 19 y z - 5 z, -7 z + 12 y, 12 z x - 11 y ] > J:=[op(GB),op(G)]; 2 2 J := [9 x + 14 x, 3 y - 14 x, z x, 19 y z - 5 z, -7 z + 12 y, 12 z x - 11 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 1/2, 5/6, 2/3, 1/3, 5/12, 5/12, 6, 12, 10, 2, 2, 2, 1, 2/3, 2/3, 2/3, 5/12, 1/3, 5/12, 0, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=115.5MB, alloc=60.3MB, time=2.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316312 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-y - 12 z, -10 x - 8 y , -10 x y - 18 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [18 x y + 16 z , -x y - 12 y, -12 x - 7 x y] > Problem := [F,G]; 2 2 Problem := [[-y - 12 z, -10 x - 8 y , -10 x y - 18 y], 2 2 [18 x y + 16 z , -x y - 12 y, -12 x - 7 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.19 memory used=27.2MB, alloc=32.3MB, time=0.56 N1 := 247 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [5 x + 9 x , 5 x y + 9 y, 4 y + 5 x , 12 z + y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.1MB, alloc=32.3MB, time=0.93 memory used=68.5MB, alloc=56.3MB, time=1.28 N2 := 247 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-y - 12 z, -10 x - 8 y , -10 x y - 18 y, 18 x y + 16 z , -x y - 12 y, 2 -12 x - 7 x y] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [5 x + 9 x , 5 x y + 9 y, 4 y + 5 x , 12 z + y, 18 x y + 16 z , 2 -x y - 12 y, -12 x - 7 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 5/6, 1, 1/3, 1/2, 2/3, 1/6, 7, 14, 14, 3, 3, 2, 2, 6/7, 6/7, 2/7, 4/7, 4/7, 1/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=72.8MB, alloc=56.3MB, time=1.37 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316313 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-17 x z - 5 y, 12 y , 8 y - 12 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [7 y - 7 x, 15 x z - 3 y , 6 - 17 z] > Problem := [F,G]; Problem := [ 2 2 2 2 [-17 x z - 5 y, 12 y , 8 y - 12 x], [7 y - 7 x, 15 x z - 3 y , 6 - 17 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.50 memory used=48.5MB, alloc=56.3MB, time=0.86 memory used=91.0MB, alloc=60.3MB, time=1.64 memory used=129.9MB, alloc=84.3MB, time=2.49 memory used=185.7MB, alloc=108.3MB, time=4.57 N1 := 1323 > GB := Basis(F, plex(op(vars))); GB := [x, y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 75 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-17 x z - 5 y, 12 y , 8 y - 12 x, 7 y - 7 x, 15 x z - 3 y , 6 - 17 z] > J:=[op(GB),op(G)]; 2 2 J := [x, y, 7 y - 7 x, 15 x z - 3 y , 6 - 17 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 1, 2/3, 5/6, 1/2, 1/3, 5/12, 1/4, 5, 8, 7, 2, 1, 2, 1, 3/5, 3/5, 2/5, 3/8, 3/8, 1/4, 4, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=205.6MB, alloc=108.3MB, time=5.06 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316320 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-20 x y - 20 x z, 10 x y - 8 z , 18 y - 9 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-5 x y - 12 x, 2 y - 7 z, 12 x - 17 y] > Problem := [F,G]; 2 2 2 Problem := [[-20 x y - 20 x z, 10 x y - 8 z , 18 y - 9 z ], 2 [-5 x y - 12 x, 2 y - 7 z, 12 x - 17 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.4MB, alloc=32.3MB, time=0.55 memory used=47.8MB, alloc=32.3MB, time=0.86 memory used=69.3MB, alloc=56.3MB, time=1.28 memory used=114.1MB, alloc=60.3MB, time=2.08 memory used=153.3MB, alloc=84.3MB, time=2.83 memory used=208.5MB, alloc=108.3MB, time=4.55 N1 := 1837 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x y, -5 x y + 8 y , x y + x z, -5 x y + 4 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=280.5MB, alloc=108.3MB, time=7.18 memory used=357.3MB, alloc=116.3MB, time=8.40 memory used=435.6MB, alloc=140.3MB, time=10.57 N2 := 1253 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-20 x y - 20 x z, 10 x y - 8 z , 18 y - 9 z , -5 x y - 12 x, -7 z + 2 y, 2 12 x - 17 y] > J:=[op(GB),op(G)]; 2 2 2 J := [x y, -5 x y + 8 y , x y + x z, -5 x y + 4 z , -5 x y - 12 x, -7 z + 2 y, 2 12 x - 17 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 2, 2, 2/3, 1, 2/3, 1/2, 1/2, 1/3, 7, 16, 14, 3, 2, 2, 2, 6/7, 1, 3/7, 4/7, 4/7, 3/14, -2, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=455.5MB, alloc=140.3MB, time=11.21 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316332 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [20 + 10 z, 17 y - 20 y, 20 y + 6 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 x z + 9 z, 6 x - 6 y z, -18 y + 14 x] > Problem := [F,G]; 2 2 2 Problem := [[20 + 10 z, 17 y - 20 y, 20 y + 6 z ], 2 2 [11 x z + 9 z, 6 x - 6 y z, -18 y + 14 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.0MB, alloc=32.3MB, time=0.50 memory used=47.7MB, alloc=32.3MB, time=0.82 memory used=68.1MB, alloc=32.3MB, time=1.16 memory used=88.0MB, alloc=56.3MB, time=1.59 N1 := 587 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=128.1MB, alloc=60.3MB, time=2.49 N2 := 81 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [20 + 10 z, 17 y - 20 y, 20 y + 6 z , 11 x z + 9 z, 6 x - 6 y z, 2 -18 y + 14 x] > J:=[op(GB),op(G)]; 2 2 J := [1, 11 x z + 9 z, 6 x - 6 y z, -18 y + 14 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 5/12, 4, 7, 6, 2, 2, 2, 1, 3/4, 1/2, 1/2, 3/7, 2/7, 3/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=129.7MB, alloc=60.3MB, time=2.53 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316335 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-20 x z - 13 y, 13 x - 10 y , -11 x z + 16 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [3 x y - 15 x, -9 y + 20 y z, x z + 11 z] > Problem := [F,G]; 2 2 2 Problem := [[-20 x z - 13 y, 13 x - 10 y , -11 x z + 16 y ], 2 [3 x y - 15 x, -9 y + 20 y z, x z + 11 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=48.1MB, alloc=32.3MB, time=0.84 memory used=69.4MB, alloc=56.3MB, time=1.23 memory used=111.2MB, alloc=60.3MB, time=1.98 memory used=148.9MB, alloc=84.3MB, time=2.75 memory used=202.2MB, alloc=108.3MB, time=4.63 N1 := 1609 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [10240 x - 1573 x , 32 x + 11 y, -104 x + 55 x z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=276.8MB, alloc=108.3MB, time=6.56 N2 := 703 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-20 x z - 13 y, -10 y + 13 x , -11 x z + 16 y , 3 x y - 15 x, 2 -9 y + 20 y z, x z + 11 z] > J:=[op(GB),op(G)]; 4 2 2 2 J := [10240 x - 1573 x , 32 x + 11 y, -104 x + 55 x z, 3 x y - 15 x, 2 -9 y + 20 y z, x z + 11 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 5/6, 5/6, 2/3, 1/2, 1/2, 5/12, 6, 11, 14, 4, 4, 2, 1, 5/6, 1/2, 1/2, 2/3, 1/3, 1/3, 3, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=316.4MB, alloc=108.3MB, time=7.46 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316344 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 x z - z , -16 x z + 8 y, 16 x - 17] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-5 y + 2 y z, -5 x + 19, 20 z - 19] > Problem := [F,G]; 2 2 Problem := [[-18 x z - z , -16 x z + 8 y, 16 x - 17], 2 2 2 [-5 y + 2 y z, -5 x + 19, 20 z - 19]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.56 memory used=47.8MB, alloc=32.3MB, time=0.92 memory used=68.7MB, alloc=56.3MB, time=1.31 memory used=110.0MB, alloc=60.3MB, time=2.10 memory used=146.2MB, alloc=84.3MB, time=2.75 memory used=201.5MB, alloc=108.3MB, time=3.76 memory used=271.4MB, alloc=132.3MB, time=5.60 memory used=351.2MB, alloc=156.3MB, time=8.53 memory used=451.6MB, alloc=156.3MB, time=12.49 memory used=552.0MB, alloc=156.3MB, time=16.28 memory used=652.6MB, alloc=180.3MB, time=19.96 N1 := 3663 > GB := Basis(F, plex(op(vars))); 2 2 GB := [16 x - 17, 4 y + 153 y, -8 x y + 17 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=693.0MB, alloc=180.3MB, time=20.74 memory used=835.4MB, alloc=212.3MB, time=24.82 N2 := 1881 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-18 x z - z , -16 x z + 8 y, 16 x - 17, -5 y + 2 y z, -5 x + 19, 2 20 z - 19] > J:=[op(GB),op(G)]; 2 2 2 2 J := [16 x - 17, 4 y + 153 y, -8 x y + 17 z, -5 y + 2 y z, -5 x + 19, 2 20 z - 19] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 2, 2/3, 1/3, 2/3, 1/3, 1/4, 5/12, 6, 9, 12, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/4, 5/12, 1/4, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=891.2MB, alloc=212.3MB, time=26.81 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316376 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [17 z - 19, -2 + 16 z, -17 z + 7 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-9 y - 15 x, 16 y - y, -17 x z + 13 z] > Problem := [F,G]; 2 2 Problem := [[17 z - 19, -2 + 16 z, -17 z + 7 z], 2 2 [-9 y - 15 x, 16 y - y, -17 x z + 13 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.51 memory used=48.0MB, alloc=56.3MB, time=0.97 N1 := 495 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [17 z - 19, -2 + 16 z, -17 z + 7 z, -9 y - 15 x, 16 y - y, -17 x z + 13 z] > J:=[op(GB),op(G)]; 2 2 J := [1, -9 y - 15 x, 16 y - y, -17 x z + 13 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 11, 2, 1, 2, 2, 1/3, 1/3, 2/3, 1/6, 1/4, 1/2, 4, 5, 6, 2, 1, 2, 1, 1/2, 1/2, 1/4, 2/7, 3/7, 2/7, 3, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=70.3MB, alloc=56.3MB, time=1.40 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316378 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-20 x - 18 z , 12 y - 4, 8 x + 7 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-13 z + 9, -14 y z - 10, -12 x y + 9 z ] > Problem := [F,G]; 2 2 2 2 Problem := [[-20 x - 18 z , 12 y - 4, 8 x + 7 y z], 2 2 [-13 z + 9, -14 y z - 10, -12 x y + 9 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.51 memory used=47.7MB, alloc=32.3MB, time=0.82 memory used=68.0MB, alloc=32.3MB, time=1.16 memory used=87.5MB, alloc=56.3MB, time=1.47 memory used=127.8MB, alloc=60.3MB, time=2.09 memory used=167.3MB, alloc=60.3MB, time=2.79 memory used=204.8MB, alloc=84.3MB, time=3.34 memory used=261.9MB, alloc=92.3MB, time=4.21 memory used=319.2MB, alloc=116.3MB, time=5.09 memory used=396.7MB, alloc=116.3MB, time=6.31 memory used=473.7MB, alloc=140.3MB, time=7.70 memory used=568.5MB, alloc=164.3MB, time=9.63 memory used=678.3MB, alloc=188.3MB, time=11.80 memory used=802.5MB, alloc=212.3MB, time=14.33 memory used=918.5MB, alloc=492.3MB, time=16.68 memory used=1069.9MB, alloc=516.3MB, time=19.77 memory used=1225.0MB, alloc=540.3MB, time=24.12 memory used=1379.4MB, alloc=564.3MB, time=29.20 memory used=1545.2MB, alloc=588.3MB, time=35.36 memory used=1722.4MB, alloc=612.3MB, time=42.71 memory used=1914.6MB, alloc=636.3MB, time=50.81 memory used=2130.8MB, alloc=660.3MB, time=60.52 memory used=2370.9MB, alloc=684.3MB, time=70.17 memory used=2635.0MB, alloc=684.3MB, time=80.55 memory used=2899.0MB, alloc=708.3MB, time=90.97 memory used=3187.0MB, alloc=708.3MB, time=102.25 memory used=3474.9MB, alloc=708.3MB, time=113.42 memory used=3762.7MB, alloc=732.3MB, time=124.59 memory used=4074.5MB, alloc=732.3MB, time=136.61 memory used=4386.3MB, alloc=756.3MB, time=148.57 memory used=4722.0MB, alloc=756.3MB, time=161.41 memory used=5058.1MB, alloc=780.3MB, time=173.68 N1 := 11295 > GB := Basis(F, plex(op(vars))); 4 2 2 2 GB := [864 x + 245 x , 3 y - 1, 24 x y + 7 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=5393.8MB, alloc=780.3MB, time=179.96 memory used=5786.9MB, alloc=804.3MB, time=187.71 memory used=6166.4MB, alloc=828.3MB, time=201.09 memory used=6527.7MB, alloc=852.3MB, time=216.04 memory used=6899.4MB, alloc=876.3MB, time=231.99 memory used=7294.9MB, alloc=900.3MB, time=249.34 memory used=7714.4MB, alloc=924.3MB, time=267.56 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316678 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 2 F := [-8 z - 17 x, -5 x + 4 y , 15 y + z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-5 x - 7 z, -18 y + 10, -x y - 16] > Problem := [F,G]; 2 2 2 2 2 Problem := [[-8 z - 17 x, -5 x + 4 y , 15 y + z ], 2 [-5 x - 7 z, -18 y + 10, -x y - 16]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=48.1MB, alloc=32.3MB, time=0.80 memory used=68.6MB, alloc=32.3MB, time=1.10 memory used=89.0MB, alloc=56.3MB, time=1.46 memory used=132.1MB, alloc=60.3MB, time=2.23 memory used=170.0MB, alloc=84.3MB, time=2.92 memory used=228.0MB, alloc=108.3MB, time=4.33 N1 := 1411 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [150 x - 17 x, 120 y - 17 x, 8 z + 17 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=301.1MB, alloc=108.3MB, time=6.29 N2 := 511 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 2 -8 z - 17 x, -5 x + 4 y , z + 15 y , -5 x - 7 z, -18 y + 10, -x y - 16] > J:=[op(GB),op(G)]; 2 2 2 2 J := [150 x - 17 x, 120 y - 17 x, 8 z + 17 x, -5 x - 7 z, -18 y + 10, -x y - 16] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 1/3, 1/4, 6, 10, 11, 2, 2, 2, 2, 5/6, 1/2, 1/3, 1/2, 1/4, 1/6, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=351.4MB, alloc=108.3MB, time=7.25 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316687 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-14 x - 6 y, 19 x + 10 z , -10 x + 19 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-20 y z + 14, -1 + 16 y, -2 y - 3 z] > Problem := [F,G]; 2 2 2 2 Problem := [[-14 x - 6 y, 19 x + 10 z , -10 x + 19 y z], [-20 y z + 14, -1 + 16 y, -2 y - 3 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.47 memory used=47.7MB, alloc=32.3MB, time=0.78 memory used=68.3MB, alloc=32.3MB, time=1.08 memory used=88.1MB, alloc=56.3MB, time=1.39 memory used=125.8MB, alloc=60.3MB, time=1.96 memory used=162.5MB, alloc=84.3MB, time=2.57 memory used=220.0MB, alloc=108.3MB, time=3.59 N1 := 817 > GB := Basis(F, plex(op(vars))); 4 2 2 2 2 2 2 GB := [336091 x + 9000 x , 7 x + 3 y, 133 x z + 30 x , 10 z + 19 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=291.1MB, alloc=108.3MB, time=4.86 memory used=369.7MB, alloc=116.3MB, time=6.08 N2 := 755 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-14 x - 6 y, 10 z + 19 x , -10 x + 19 y z, -20 y z + 14, 16 y - 1, -2 y - 3 z] > J:=[op(GB),op(G)]; 4 2 2 2 2 2 2 J := [336091 x + 9000 x , 7 x + 3 y, 133 x z + 30 x , 10 z + 19 x , -20 y z + 14, 16 y - 1, -2 y - 3 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 1, 2, 1/2, 5/6, 2/3, 1/4, 5/12, 1/3, 7, 12, 15, 4, 4, 1, 2, 4/7, 4/7, 4/7, 3/7, 2/7, 2/7, 0, -5, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=422.3MB, alloc=116.3MB, time=7.20 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316695 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [13 x - 20 y, -1 + 10 y, 20 x + 10] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-6 x z - 10 z, 17 x y + 18 x, 11 x y - 18 z ] > Problem := [F,G]; 2 2 Problem := [[13 x - 20 y, -1 + 10 y, 20 x + 10], 2 [-6 x z - 10 z, 17 x y + 18 x, 11 x y - 18 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 N1 := 337 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=57.1MB, alloc=68.3MB, time=1.01 N2 := 109 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [13 x - 20 y, 10 y - 1, 20 x + 10, -6 x z - 10 z, 17 x y + 18 x, 2 -18 z + 11 y x] > J:=[op(GB),op(G)]; 2 J := [1, -6 x z - 10 z, 17 x y + 18 x, -18 z + 11 y x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 5/6, 2/3, 1/3, 1/2, 1/3, 1/4, 4, 7, 6, 2, 1, 1, 2, 3/4, 1/2, 1/2, 4/7, 2/7, 3/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=68.7MB, alloc=68.3MB, time=1.19 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316696 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-9 y z - 4 x, -19 z - 19 x, -9 y + 6 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [8 x - 2, 17 x + 19 z, 15 y - 9 y z] > Problem := [F,G]; 2 2 Problem := [[-9 y z - 4 x, -19 z - 19 x, -9 y + 6 x], 2 2 2 [8 x - 2, 17 x + 19 z, 15 y - 9 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.78 memory used=68.5MB, alloc=32.3MB, time=1.08 memory used=88.7MB, alloc=56.3MB, time=1.41 memory used=131.1MB, alloc=60.3MB, time=2.12 memory used=168.7MB, alloc=84.3MB, time=2.79 memory used=224.5MB, alloc=108.3MB, time=3.92 memory used=291.3MB, alloc=132.3MB, time=6.21 N1 := 2045 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x , y x, 3 y - 2 x, x z, 9 z y + 4 x, z + x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=381.6MB, alloc=132.3MB, time=8.42 memory used=478.9MB, alloc=140.3MB, time=9.94 memory used=573.2MB, alloc=164.3MB, time=11.68 memory used=672.7MB, alloc=188.3MB, time=15.10 N2 := 2477 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-9 y z - 4 x, -19 z - 19 x, -9 y + 6 x, 8 x - 2, 17 x + 19 z, 2 15 y - 9 y z] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x , y x, 3 y - 2 x, x z, 9 z y + 4 x, z + x, 8 x - 2, 17 x + 19 z, 2 15 y - 9 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 1/2, 2/3, 5/12, 1/3, 1/3, 9, 17, 18, 2, 2, 2, 2, 8/9, 4/9, 5/9, 4/9, 5/18, 5/18, -5, -6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=770.6MB, alloc=188.3MB, time=18.51 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316716 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-16 y - 10 z , -9 x y - 15 x z, -4 x - 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [12 x y, 9 x z + 7 y z, 9 x y - 6 z ] > Problem := [F,G]; 2 2 Problem := [[-16 y - 10 z , -9 x y - 15 x z, -4 x - 17 z], 2 [12 x y, 9 x z + 7 y z, 9 x y - 6 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.1MB, alloc=32.3MB, time=0.51 N1 := 235 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [x , -20 x + 51 x y, 289 y + 10 x , 17 z + 4 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.5MB, alloc=32.3MB, time=0.86 N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-16 y - 10 z , -9 x y - 15 x z, -4 x - 17 z, 12 y x, 9 x z + 7 y z, 2 9 x y - 6 z ] > J:=[op(GB),op(G)]; 3 2 2 2 J := [x , -20 x + 51 x y, 289 y + 10 x , 17 z + 4 x, 12 y x, 9 x z + 7 y z, 2 9 x y - 6 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 11, 2, 1, 2, 2, 5/6, 5/6, 5/6, 6/13, 5/13, 6/13, 7, 15, 14, 3, 3, 2, 2, 1, 5/7, 3/7, 8/15, 1/3, 4/15, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=59.6MB, alloc=32.3MB, time=1.03 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316717 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [16 y - 3, -11 x y + 12 y z, 11 x z - 6 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [13 y + 6 z, 2 x y - 16 y, -14 x y + z ] > Problem := [F,G]; 2 2 Problem := [[16 y - 3, -11 x y + 12 y z, 11 x z - 6 y ], 2 2 [13 y + 6 z, 2 x y - 16 y, -14 x y + z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=68.0MB, alloc=56.3MB, time=1.09 memory used=107.3MB, alloc=60.3MB, time=1.65 memory used=148.9MB, alloc=84.3MB, time=2.39 memory used=208.8MB, alloc=84.3MB, time=3.38 memory used=263.4MB, alloc=108.3MB, time=4.33 memory used=338.1MB, alloc=140.3MB, time=5.67 memory used=429.2MB, alloc=164.3MB, time=7.27 memory used=531.7MB, alloc=188.3MB, time=9.82 memory used=642.5MB, alloc=212.3MB, time=13.21 memory used=762.5MB, alloc=236.3MB, time=17.79 memory used=906.2MB, alloc=236.3MB, time=23.28 memory used=1050.0MB, alloc=260.3MB, time=28.79 memory used=1217.8MB, alloc=260.3MB, time=35.20 memory used=1385.6MB, alloc=284.3MB, time=41.73 N1 := 5605 > GB := Basis(F, plex(op(vars))); 2 2 GB := [242 x - 27, 16 y - 3, -11 x + 12 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1580.4MB, alloc=284.3MB, time=47.20 N2 := 1883 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [16 y - 3, -11 x y + 12 y z, 11 z x - 6 y , 13 y + 6 z, 2 x y - 16 y, 2 -14 x y + z ] > J:=[op(GB),op(G)]; 2 2 2 J := [242 x - 27, 16 y - 3, -11 x + 12 z, 13 y + 6 z, 2 x y - 16 y, 2 -14 x y + z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 1, 2, 2, 2/3, 1, 2/3, 1/3, 2/3, 1/3, 6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 5/12, 1/4, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1778.1MB, alloc=540.3MB, time=53.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316775 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-6 y , -16 y z + 20, 11 x + 9 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [13 z - 14 x, -10 x y - 4 y, 17 x + 13 z] > Problem := [F,G]; 2 2 Problem := [[-6 y , -16 y z + 20, 11 x + 9 y z], 2 [13 z - 14 x, -10 x y - 4 y, 17 x + 13 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.49 memory used=48.5MB, alloc=32.3MB, time=0.81 memory used=69.0MB, alloc=56.3MB, time=1.19 memory used=111.4MB, alloc=60.3MB, time=1.94 memory used=148.4MB, alloc=84.3MB, time=2.69 memory used=199.4MB, alloc=108.3MB, time=4.41 N1 := 1409 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 93 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 H := [-6 y , -16 y z + 20, 9 z y + 11 x , 13 z - 14 x, -10 x y - 4 y, 13 z + 17 x] > J:=[op(GB),op(G)]; 2 J := [1, 13 z - 14 x, -10 x y - 4 y, 13 z + 17 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 2/3, 2/3, 2/3, 1/3, 5/12, 1/3, 4, 6, 5, 2, 1, 1, 2, 3/4, 1/4, 1/2, 3/7, 2/7, 2/7, 6, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=215.1MB, alloc=108.3MB, time=4.68 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316780 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-6 y z + 13 z, 5 x z + y , -5 y + 6 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-10 x z + 20, -10 x + 5 y, -20 x z - 17 y z] > Problem := [F,G]; 2 2 Problem := [[-6 y z + 13 z, 5 x z + y , -5 y + 6 z], 2 [-10 x z + 20, -10 x + 5 y, -20 x z - 17 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.44 memory used=47.4MB, alloc=32.3MB, time=0.73 memory used=67.7MB, alloc=32.3MB, time=1.02 memory used=88.2MB, alloc=56.3MB, time=1.39 memory used=129.0MB, alloc=60.3MB, time=2.08 memory used=165.4MB, alloc=84.3MB, time=2.72 memory used=219.6MB, alloc=108.3MB, time=4.44 N1 := 1555 > GB := Basis(F, plex(op(vars))); 2 2 3 2 2 GB := [25 x y + 6 y , 6 y - 13 y , -5 y + 6 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=292.0MB, alloc=108.3MB, time=6.08 memory used=373.0MB, alloc=140.3MB, time=7.61 N2 := 1239 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-6 y z + 13 z, 5 z x + y , -5 y + 6 z, -10 x z + 20, -10 x + 5 y, -20 x z - 17 y z] > J:=[op(GB),op(G)]; 2 2 3 2 2 2 J := [25 x y + 6 y , 6 y - 13 y , -5 y + 6 z, -10 x z + 20, -10 x + 5 y, -20 x z - 17 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 2/3, 5/6, 5/6, 1/3, 5/12, 7/12, 6, 12, 14, 3, 2, 3, 1, 2/3, 5/6, 1/2, 1/3, 7/12, 1/3, 2, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=420.8MB, alloc=140.3MB, time=9.08 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316789 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-15 x y - 5 y , 16 y z - 20 z , -13 y z + 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [5 x z + 14, y + 3 y, 11 x - 16 x z] > Problem := [F,G]; 2 2 Problem := [[-15 x y - 5 y , 16 y z - 20 z , -13 y z + 17 z], 2 2 [5 x z + 14, y + 3 y, 11 x - 16 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=25.9MB, alloc=32.3MB, time=0.45 memory used=46.9MB, alloc=32.3MB, time=0.73 memory used=68.3MB, alloc=56.3MB, time=1.11 memory used=109.2MB, alloc=60.3MB, time=1.83 memory used=145.5MB, alloc=84.3MB, time=2.48 memory used=198.9MB, alloc=108.3MB, time=4.01 memory used=270.2MB, alloc=108.3MB, time=6.36 N1 := 1887 > GB := Basis(F, plex(op(vars))); 2 2 GB := [3 x y + y , 39 x z + 17 z, 13 y z - 17 z, 65 z - 68 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=335.9MB, alloc=116.3MB, time=7.43 N2 := 773 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-15 x y - 5 y , 16 y z - 20 z , -13 y z + 17 z, 5 z x + 14, y + 3 y, 2 11 x - 16 x z] > J:=[op(GB),op(G)]; 2 2 J := [3 x y + y , 39 x z + 17 z, 13 y z - 17 z, 65 z - 68 z, 5 z x + 14, 2 2 y + 3 y, 11 x - 16 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/3, 1/2, 1/2, 7, 12, 14, 2, 2, 2, 2, 4/7, 3/7, 5/7, 5/14, 5/14, 4/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=366.4MB, alloc=116.3MB, time=8.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316798 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [6 + z, -x y - 16 z, -13 x y - 13] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [18 x y - 19 y z, 14 z - z, -20 z + 19 y] > Problem := [F,G]; Problem := [[6 + z, -x y - 16 z, -13 x y - 13], 2 2 [18 x y - 19 y z, 14 z - z, -20 z + 19 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.79 memory used=67.3MB, alloc=56.3MB, time=1.09 memory used=106.6MB, alloc=60.3MB, time=1.67 memory used=142.4MB, alloc=84.3MB, time=2.22 memory used=200.2MB, alloc=108.3MB, time=3.24 memory used=275.2MB, alloc=132.3MB, time=4.58 memory used=365.5MB, alloc=164.3MB, time=6.20 memory used=468.9MB, alloc=188.3MB, time=8.02 memory used=579.8MB, alloc=212.3MB, time=10.26 memory used=692.1MB, alloc=236.3MB, time=13.43 memory used=814.5MB, alloc=260.3MB, time=17.30 memory used=948.4MB, alloc=284.3MB, time=22.21 memory used=1100.8MB, alloc=308.3MB, time=28.15 memory used=1277.2MB, alloc=332.3MB, time=34.88 memory used=1477.5MB, alloc=332.3MB, time=42.47 memory used=1677.8MB, alloc=332.3MB, time=49.98 memory used=1878.1MB, alloc=356.3MB, time=57.51 memory used=2102.3MB, alloc=356.3MB, time=66.06 memory used=2326.5MB, alloc=356.3MB, time=74.60 memory used=2550.6MB, alloc=380.3MB, time=83.24 memory used=2798.7MB, alloc=404.3MB, time=92.63 N1 := 9015 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=3075.7MB, alloc=404.3MB, time=102.85 N2 := 373 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := [ 2 2 z + 6, -x y - 16 z, -13 x y - 13, 18 x y - 19 y z, 14 z - z, -20 z + 19 y ] > J:=[op(GB),op(G)]; 2 2 J := [1, 18 x y - 19 y z, 14 z - z, -20 z + 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 1, 2, 1/2, 2/3, 5/6, 1/4, 5/12, 1/2, 4, 6, 6, 2, 1, 1, 2, 1/4, 1/2, 3/4, 1/7, 3/7, 4/7, 6, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=3078.6MB, alloc=404.3MB, time=102.95 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316908 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [2 y z + 9, 6 x - 17 z , -y + 18 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 x y - 11 y , 14 x y + 6 y, 15 x - 1] > Problem := [F,G]; 2 2 2 Problem := [[2 y z + 9, 6 x - 17 z , -y + 18 y z], 2 2 [11 x y - 11 y , 14 x y + 6 y, 15 x - 1]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=48.7MB, alloc=32.3MB, time=0.90 memory used=69.8MB, alloc=56.3MB, time=1.28 memory used=113.6MB, alloc=60.3MB, time=2.03 memory used=150.8MB, alloc=84.3MB, time=2.78 memory used=203.0MB, alloc=108.3MB, time=4.61 N1 := 1621 > GB := Basis(F, plex(op(vars))); 2 2 GB := [24 x + 17, y + 81, -y + 18 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 129 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [2 z y + 9, -17 z + 6 x , -y + 18 y z, 11 x y - 11 y , 14 x y + 6 y, 2 15 x - 1] > J:=[op(GB),op(G)]; 2 2 2 2 J := [24 x + 17, y + 81, -y + 18 z, 11 x y - 11 y , 14 x y + 6 y, 15 x - 1] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 7/12, 1/4, 6, 9, 11, 2, 2, 2, 1, 2/3, 2/3, 1/6, 1/3, 1/2, 1/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=255.1MB, alloc=108.3MB, time=5.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316914 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [19 x - 3 y, -17 y , 6 z - 7] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [12 x y + 16 z , x z - 12 x, 5 y z - 10 x] > Problem := [F,G]; Problem := [ 2 2 2 [19 x - 3 y, -17 y , 6 z - 7], [12 x y + 16 z , x z - 12 x, 5 y z - 10 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.9MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=67.6MB, alloc=56.3MB, time=1.08 memory used=111.4MB, alloc=60.3MB, time=1.86 memory used=149.8MB, alloc=84.3MB, time=2.55 memory used=206.0MB, alloc=108.3MB, time=3.56 memory used=273.2MB, alloc=132.3MB, time=5.70 memory used=359.7MB, alloc=132.3MB, time=8.58 N1 := 2273 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , -19 x + 3 y, 6 z - 7] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=446.9MB, alloc=140.3MB, time=10.01 memory used=545.2MB, alloc=164.3MB, time=11.74 memory used=651.6MB, alloc=188.3MB, time=15.10 N2 := 2273 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-3 y + 19 x, -17 y , 6 z - 7, 12 x y + 16 z , x z - 12 x, 5 y z - 10 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x , -19 x + 3 y, 6 z - 7, 12 x y + 16 z , x z - 12 x, 5 y z - 10 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 2/3, 2/3, 2/3, 5/12, 1/3, 1/3, 6, 12, 11, 2, 2, 1, 2, 5/6, 1/2, 2/3, 1/2, 1/4, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=731.2MB, alloc=188.3MB, time=17.79 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316932 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-16 x y + 3 y , -19 x y - 20 x z, 4 x + 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-9 x z + 14 y, -3 x - 16 z, -9 x y + 8 y ] > Problem := [F,G]; 2 Problem := [[-16 x y + 3 y , -19 x y - 20 x z, 4 x + 19 y], 2 [-9 x z + 14 y, -3 x - 16 z, -9 x y + 8 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.47 memory used=48.9MB, alloc=32.3MB, time=0.85 memory used=68.8MB, alloc=56.3MB, time=1.20 N1 := 789 > GB := Basis(F, plex(op(vars))); 2 GB := [x , 19 y + 4 x, z x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=109.6MB, alloc=56.3MB, time=2.10 N2 := 335 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-16 x y + 3 y , -19 x y - 20 x z, 19 y + 4 x, -9 x z + 14 y, -3 x - 16 z, 2 -9 x y + 8 y ] > J:=[op(GB),op(G)]; 2 2 J := [x , 19 y + 4 x, z x, -9 x z + 14 y, -3 x - 16 z, -9 x y + 8 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 10, 2, 1, 2, 1, 1, 5/6, 1/2, 7/12, 7/12, 1/4, 6, 12, 10, 2, 2, 2, 1, 1, 1/2, 1/2, 1/2, 1/3, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=141.0MB, alloc=60.3MB, time=2.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316935 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [15 x + 20 y z, 6 x y + 7 x z, -19 x + 20] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [9 x z - 17 y z, 14 x + 6 y, -6 x + 14 y ] > Problem := [F,G]; 2 2 Problem := [[15 x + 20 y z, 6 x y + 7 x z, -19 x + 20], 2 2 2 [9 x z - 17 y z, 14 x + 6 y, -6 x + 14 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.2MB, alloc=32.3MB, time=0.45 memory used=49.1MB, alloc=32.3MB, time=0.81 memory used=69.4MB, alloc=56.3MB, time=1.15 memory used=110.5MB, alloc=60.3MB, time=1.79 memory used=146.4MB, alloc=84.3MB, time=2.58 memory used=198.1MB, alloc=108.3MB, time=4.41 N1 := 1495 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x - 20, 38 y - 35, 7 z + 6 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=272.2MB, alloc=116.3MB, time=5.65 memory used=349.3MB, alloc=140.3MB, time=7.25 memory used=436.1MB, alloc=164.3MB, time=10.35 N2 := 1675 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [15 x + 20 y z, 6 x y + 7 x z, -19 x + 20, 9 x z - 17 y z, 14 x + 6 y, 2 2 -6 x + 14 y ] > J:=[op(GB),op(G)]; 2 2 2 J := [19 x - 20, 38 y - 35, 7 z + 6 y, 9 x z - 17 y z, 14 x + 6 y, 2 2 -6 x + 14 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 1, 1, 5/6, 1/2, 7/12, 5/12, 1/3, 6, 11, 11, 2, 2, 2, 1, 2/3, 5/6, 1/3, 1/3, 5/12, 1/4, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=442.3MB, alloc=164.3MB, time=10.52 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316946 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-20 x - 12 z , -8 y - 13 z, 16 + 18 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-10 x + 5 y , -16 y z - 6 y, -18 x z - 8 z ] > Problem := [F,G]; 2 2 Problem := [[-20 x - 12 z , -8 y - 13 z, 16 + 18 z], 2 2 2 [-10 x + 5 y , -16 y z - 6 y, -18 x z - 8 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.78 memory used=67.9MB, alloc=56.3MB, time=1.12 memory used=110.7MB, alloc=56.3MB, time=1.86 memory used=147.9MB, alloc=80.3MB, time=2.51 memory used=201.6MB, alloc=104.3MB, time=4.09 N1 := 1775 > GB := Basis(F, plex(op(vars))); 2 GB := [135 x + 64, 9 y - 13, 9 z + 8] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=274.5MB, alloc=104.3MB, time=6.22 N2 := 773 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-20 x - 12 z , -8 y - 13 z, 16 + 18 z, -10 x + 5 y , -16 y z - 6 y, 2 -18 x z - 8 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [135 x + 64, 9 y - 13, 9 z + 8, -10 x + 5 y , -16 y z - 6 y, 2 -18 x z - 8 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/3, 1/2, 6, 9, 10, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/4, 1/3, 1/3, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=343.8MB, alloc=108.3MB, time=7.56 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428316954 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 y z - 16 x, -10 + 11 y, -5 x - 19 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-16 y z - 17 x, -8 y z + 2 z , -19 y + 19] > Problem := [F,G]; 2 Problem := [[-7 y z - 16 x, -10 + 11 y, -5 x - 19 z], 2 2 [-16 y z - 17 x, -8 y z + 2 z , -19 y + 19]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=47.3MB, alloc=32.3MB, time=0.75 memory used=67.1MB, alloc=32.3MB, time=1.04 memory used=85.5MB, alloc=56.3MB, time=1.32 memory used=124.4MB, alloc=60.3MB, time=1.88 memory used=192.0MB, alloc=100.3MB, time=2.99 memory used=253.7MB, alloc=124.3MB, time=4.03 memory used=332.5MB, alloc=148.3MB, time=5.44 memory used=426.3MB, alloc=172.3MB, time=7.11 memory used=532.6MB, alloc=196.3MB, time=9.34 memory used=643.6MB, alloc=220.3MB, time=12.50 memory used=765.3MB, alloc=244.3MB, time=16.72 memory used=901.7MB, alloc=268.3MB, time=22.44 memory used=1062.2MB, alloc=292.3MB, time=28.85 memory used=1246.6MB, alloc=292.3MB, time=36.96 memory used=1431.0MB, alloc=292.3MB, time=44.37 memory used=1615.4MB, alloc=316.3MB, time=51.91 memory used=1823.9MB, alloc=340.3MB, time=59.90 N1 := 6649 > GB := Basis(F, plex(op(vars))); 2 GB := [175 x - 1672 x, 11 y - 10, 35 z + 88 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1987.4MB, alloc=340.3MB, time=64.34 N2 := 1997 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-7 y z - 16 x, 11 y - 10, -5 x - 19 z, -16 y z - 17 x, -8 y z + 2 z , 2 -19 y + 19] > J:=[op(GB),op(G)]; 2 2 J := [175 x - 1672 x, 11 y - 10, 35 z + 88 x, -16 y z - 17 x, -8 y z + 2 z , 2 -19 y + 19] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 5/12, 5/12, 6, 10, 10, 2, 2, 2, 2, 1/2, 2/3, 1/2, 1/3, 1/3, 1/3, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2199.5MB, alloc=596.3MB, time=70.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317035 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [18 x y + 6 y , -10 x + 10 y, -4 y - 12 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 z + 12, 10 x - 20, 15 x z + 3 y] > Problem := [F,G]; 2 2 2 2 Problem := [[18 x y + 6 y , -10 x + 10 y, -4 y - 12 z ], 2 2 [16 z + 12, 10 x - 20, 15 x z + 3 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.22 memory used=26.4MB, alloc=32.3MB, time=0.53 memory used=47.7MB, alloc=32.3MB, time=0.91 memory used=68.8MB, alloc=56.3MB, time=1.29 memory used=110.4MB, alloc=60.3MB, time=2.07 N1 := 507 > GB := Basis(F, plex(op(vars))); 4 3 2 3 2 GB := [x + 3 x , -x + y, -x + z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=147.2MB, alloc=60.3MB, time=2.70 N2 := 283 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [18 x y + 6 y , -10 x + 10 y, -4 y - 12 z , 16 z + 12, 10 x - 20, 15 x z + 3 y] > J:=[op(GB),op(G)]; 4 3 2 3 2 2 2 J := [x + 3 x , -x + y, -x + z , 16 z + 12, 10 x - 20, 15 x z + 3 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 5/12, 1/4, 6, 10, 15, 4, 4, 1, 2, 5/6, 1/3, 1/2, 1/2, 1/6, 1/4, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=169.8MB, alloc=60.3MB, time=3.08 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317038 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-10 y z - 6, 19 x y + 8 x z, -4 y + 14 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-13 z - 12 x, -x z - 14 x, -2 x y + 9 y] > Problem := [F,G]; 2 Problem := [[-10 y z - 6, 19 x y + 8 x z, -4 y + 14 z], 2 [-13 z - 12 x, -x z - 14 x, -2 x y + 9 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.16 memory used=26.0MB, alloc=32.3MB, time=0.45 memory used=46.8MB, alloc=32.3MB, time=0.73 memory used=66.1MB, alloc=56.3MB, time=1.02 memory used=104.3MB, alloc=60.3MB, time=1.61 memory used=140.9MB, alloc=84.3MB, time=2.21 memory used=199.0MB, alloc=108.3MB, time=3.26 memory used=274.9MB, alloc=132.3MB, time=4.70 memory used=368.1MB, alloc=164.3MB, time=6.40 memory used=471.4MB, alloc=188.3MB, time=8.25 memory used=580.9MB, alloc=212.3MB, time=11.14 memory used=698.5MB, alloc=236.3MB, time=14.95 memory used=827.6MB, alloc=260.3MB, time=20.26 memory used=980.7MB, alloc=260.3MB, time=26.51 memory used=1133.7MB, alloc=284.3MB, time=32.68 memory used=1310.7MB, alloc=284.3MB, time=40.28 memory used=1487.7MB, alloc=284.3MB, time=47.48 memory used=1664.6MB, alloc=308.3MB, time=54.69 memory used=1865.5MB, alloc=332.3MB, time=62.68 N1 := 6801 > GB := Basis(F, plex(op(vars))); 3 2 GB := [x, 10 y + 21, -2 y + 7 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 457 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-10 y z - 6, 19 x y + 8 x z, -4 y + 14 z, -13 z - 12 x, -x z - 14 x, -2 x y + 9 y] > J:=[op(GB),op(G)]; 3 2 2 J := [x, 10 y + 21, -2 y + 7 z, -13 z - 12 x, -x z - 14 x, -2 x y + 9 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 1, 2, 2, 2/3, 2/3, 5/6, 1/2, 5/12, 5/12, 6, 10, 12, 3, 1, 3, 2, 2/3, 1/2, 1/2, 5/11, 4/11, 3/11, 3, 0, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1993.9MB, alloc=332.3MB, time=66.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317123 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-20 y z - 10 y, -20 z + 17 y, -10 x z + 8 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [17 y - 19 y z, 18 x z + 14 z, -2 x z] > Problem := [F,G]; 2 Problem := [[-20 y z - 10 y, -20 z + 17 y, -10 x z + 8 z], 2 [17 y - 19 y z, 18 x z + 14 z, -2 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.19 memory used=26.3MB, alloc=32.3MB, time=0.52 memory used=48.2MB, alloc=56.3MB, time=0.95 N1 := 525 > GB := Basis(F, plex(op(vars))); 2 2 GB := [5 x y - 4 y, 17 y - 5 y, 5 x z - 4 z, 2 y z + y, 20 z - 17 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=87.9MB, alloc=60.3MB, time=1.72 N2 := 525 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-20 y z - 10 y, -20 z + 17 y, -10 x z + 8 z, 17 y - 19 y z, 18 x z + 14 z, -2 x z] > J:=[op(GB),op(G)]; 2 2 J := [5 x y - 4 y, 17 y - 5 y, 5 x z - 4 z, 2 y z + y, 20 z - 17 y, 2 17 y - 19 y z, 18 x z + 14 z, -2 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 1/2, 1/2, 1, 3/13, 5/13, 8/13, 8, 15, 16, 2, 1, 2, 2, 1/2, 5/8, 3/4, 4/17, 9/17, 8/17, -3, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=122.9MB, alloc=60.3MB, time=2.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317126 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [6 x y - 16 z , 9 x - 2 x z, 13 y + 4 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-13 x y - 12 z , -5 x + 19 x y, -17 x y + 8 y z] > Problem := [F,G]; 2 2 2 Problem := [[6 x y - 16 z , 9 x - 2 x z, 13 y + 4 y z], 2 2 [-13 x y - 12 z , -5 x + 19 x y, -17 x y + 8 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.53 memory used=50.4MB, alloc=32.3MB, time=0.98 N1 := 435 > GB := Basis(F, plex(op(vars))); 4 3 2 3 2 3 3 2 GB := [x , -54 x + x y, 972 x + 13 x y , 5832 x + 2197 y , -9 x + 2 x z, 2 2 13 y + 4 y z, -3 x y + 8 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=69.5MB, alloc=56.3MB, time=1.42 memory used=110.7MB, alloc=60.3MB, time=2.10 N2 := 435 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [6 x y - 16 z , 9 x - 2 x z, 13 y + 4 y z, -13 x y - 12 z , 2 -5 x + 19 x y, -17 x y + 8 y z] > J:=[op(GB),op(G)]; 4 3 2 3 2 3 3 2 J := [x , -54 x + x y, 972 x + 13 x y , 5832 x + 2197 y , -9 x + 2 x z, 2 2 2 2 13 y + 4 y z, -3 x y + 8 z , -13 x y - 12 z , -5 x + 19 x y, -17 x y + 8 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 2, 2, 5/6, 5/6, 5/6, 7/12, 7/12, 5/12, 10, 22, 25, 4, 4, 3, 2, 9/10, 4/5, 1/2, 13/20, 1/2, 1/4, -7, -13, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=132.5MB, alloc=60.3MB, time=2.50 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317129 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [2 x + y, 6 x y + 15 y z, 11 z + y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [3 x y + 18 y z, 13 y z + 19 z, -16 x z + 4 z] > Problem := [F,G]; 2 2 Problem := [[2 x + y, 6 x y + 15 y z, 11 z + y], [3 x y + 18 y z, 13 y z + 19 z, -16 x z + 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.16 memory used=26.0MB, alloc=32.3MB, time=0.46 memory used=49.0MB, alloc=32.3MB, time=0.86 memory used=69.3MB, alloc=56.3MB, time=1.26 memory used=110.0MB, alloc=84.3MB, time=2.05 memory used=166.9MB, alloc=84.3MB, time=3.85 N1 := 1639 > GB := Basis(F, plex(op(vars))); 4 2 3 2 2 2 GB := [x , 2 x + y, 2 x + 5 x z, -2 x + 11 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=219.0MB, alloc=84.3MB, time=5.47 N2 := 587 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [2 x + y, 6 x y + 15 y z, 11 z + y, 3 x y + 18 y z, 13 y z + 19 z, -16 x z + 4 z] > J:=[op(GB),op(G)]; 4 2 3 2 2 2 J := [x , 2 x + y, 2 x + 5 x z, -2 x + 11 z , 3 x y + 18 y z, 13 y z + 19 z, -16 x z + 4 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 1, 2, 2/3, 5/6, 5/6, 1/3, 7/12, 7/12, 7, 14, 17, 4, 4, 1, 2, 6/7, 3/7, 5/7, 1/2, 2/7, 1/2, 0, -5, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=271.1MB, alloc=84.3MB, time=6.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317137 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [16 y + 11 z , 4 y + 9 x, 1 - 7 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [12 z + 16 x, -20 y z + 15 x, 4 y - 16] > Problem := [F,G]; 2 2 2 Problem := [[16 y + 11 z , 4 y + 9 x, 1 - 7 y], 2 2 [12 z + 16 x, -20 y z + 15 x, 4 y - 16]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.8MB, alloc=32.3MB, time=0.83 memory used=68.4MB, alloc=32.3MB, time=1.13 memory used=88.5MB, alloc=56.3MB, time=1.53 memory used=131.9MB, alloc=60.3MB, time=2.40 memory used=169.3MB, alloc=84.3MB, time=3.15 N1 := 1155 > GB := Basis(F, plex(op(vars))); 2 GB := [441 x + 4, 7 y - 1, 539 z + 16] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=223.7MB, alloc=84.3MB, time=4.78 memory used=282.6MB, alloc=84.3MB, time=5.71 N2 := 655 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 11 z + 16 y , 4 y + 9 x, 1 - 7 y, 12 z + 16 x, -20 y z + 15 x, 4 y - 16 ] > J:=[op(GB),op(G)]; 2 2 2 J := [441 x + 4, 7 y - 1, 539 z + 16, 12 z + 16 x, -20 y z + 15 x, 4 y - 16] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/2, 5/6, 1/2, 1/4, 5/12, 1/4, 6, 9, 10, 2, 1, 2, 2, 1/2, 1/2, 1/2, 1/4, 1/4, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=328.4MB, alloc=84.3MB, time=6.71 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317145 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [12 x y - 10 z, -6 x z - 13 z, -8 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-5 y z + 18 z , 17 x + 15 z , -7 y - 9 z] > Problem := [F,G]; Problem := [[12 x y - 10 z, -6 x z - 13 z, -8 y], 2 2 2 2 [-5 y z + 18 z , 17 x + 15 z , -7 y - 9 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.53 memory used=47.6MB, alloc=32.3MB, time=0.91 memory used=68.4MB, alloc=56.3MB, time=1.33 N1 := 429 > GB := Basis(F, plex(op(vars))); GB := [y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 87 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [12 x y - 10 z, -6 x z - 13 z, -8 y, -5 y z + 18 z , 15 z + 17 x , 2 -7 y - 9 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [y, z, -5 y z + 18 z , 15 z + 17 x , -7 y - 9 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 1/2, 2/3, 5/6, 1/4, 1/3, 7/12, 5, 8, 8, 2, 2, 2, 2, 1/5, 3/5, 4/5, 1/8, 3/8, 5/8, 4, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=97.6MB, alloc=56.3MB, time=1.86 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317147 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [2 x + 18 y , 18 x - 2 y z, -y - 16] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-5 x - 8 x, -9 x - 13 z, 3 z + 13] > Problem := [F,G]; 2 2 2 2 Problem := [[2 x + 18 y , 18 x - 2 y z, -y - 16], 2 2 2 [-5 x - 8 x, -9 x - 13 z, 3 z + 13]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.51 memory used=47.9MB, alloc=32.3MB, time=0.87 memory used=68.6MB, alloc=56.3MB, time=1.25 N1 := 345 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x - 144, y + 16, z + 81 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.0MB, alloc=60.3MB, time=1.90 N2 := 117 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 2 2 2 x + 18 y , 18 x - 2 y z, -y - 16, -5 x - 8 x, -9 x - 13 z, 3 z + 13 ] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x - 144, y + 16, z + 81 y, -5 x - 8 x, -9 x - 13 z, 3 z + 13] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 2, 2/3, 1/2, 1/2, 5/12, 1/4, 1/4, 6, 8, 11, 2, 2, 2, 2, 1/2, 1/3, 1/2, 1/3, 1/6, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=108.8MB, alloc=60.3MB, time=1.92 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317149 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [14 z - 4 y, -7 y z - 5 z , 2 x y - 7 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [15 x y - 12 y z, -3 y + 5, -x z - 11 x] > Problem := [F,G]; 2 2 2 Problem := [[14 z - 4 y, -7 y z - 5 z , 2 x y - 7 z ], 2 [15 x y - 12 y z, -3 y + 5, -x z - 11 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.78 memory used=66.7MB, alloc=32.3MB, time=1.05 memory used=85.3MB, alloc=56.3MB, time=1.33 memory used=124.4MB, alloc=60.3MB, time=1.93 memory used=161.2MB, alloc=60.3MB, time=2.48 memory used=195.3MB, alloc=84.3MB, time=3.02 memory used=248.6MB, alloc=108.3MB, time=3.97 memory used=324.8MB, alloc=140.3MB, time=5.57 memory used=415.8MB, alloc=164.3MB, time=7.29 memory used=520.9MB, alloc=188.3MB, time=9.46 memory used=641.2MB, alloc=212.3MB, time=11.91 memory used=772.0MB, alloc=236.3MB, time=14.49 memory used=893.3MB, alloc=516.3MB, time=16.86 memory used=1032.0MB, alloc=540.3MB, time=20.78 memory used=1173.2MB, alloc=564.3MB, time=25.39 memory used=1325.1MB, alloc=588.3MB, time=30.62 memory used=1489.5MB, alloc=612.3MB, time=36.56 memory used=1666.5MB, alloc=636.3MB, time=43.44 memory used=1856.0MB, alloc=660.3MB, time=51.63 memory used=2069.5MB, alloc=684.3MB, time=60.80 memory used=2307.0MB, alloc=708.3MB, time=70.83 memory used=2568.4MB, alloc=732.3MB, time=81.91 memory used=2853.7MB, alloc=732.3MB, time=94.35 memory used=3139.0MB, alloc=756.3MB, time=106.39 memory used=3448.2MB, alloc=756.3MB, time=119.18 memory used=3757.3MB, alloc=756.3MB, time=132.07 memory used=4066.5MB, alloc=756.3MB, time=144.92 memory used=4375.5MB, alloc=780.3MB, time=157.70 memory used=4708.4MB, alloc=780.3MB, time=171.40 memory used=5041.3MB, alloc=780.3MB, time=185.11 memory used=5374.1MB, alloc=804.3MB, time=198.84 memory used=5730.9MB, alloc=804.3MB, time=213.80 memory used=6087.4MB, alloc=828.3MB, time=228.74 memory used=6467.9MB, alloc=828.3MB, time=244.70 memory used=6848.3MB, alloc=852.3MB, time=260.44 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317449 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 - 11 z, -14 x z + 5, 3 y - 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-3 y - 11 y z, 5 z - 18 y, 4 x + 9 x y] > Problem := [F,G]; 2 Problem := [[-7 - 11 z, -14 x z + 5, 3 y - 17 z], 2 2 2 [-3 y - 11 y z, 5 z - 18 y, 4 x + 9 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.7MB, alloc=32.3MB, time=0.82 memory used=67.7MB, alloc=32.3MB, time=1.11 memory used=86.1MB, alloc=56.3MB, time=1.41 memory used=121.7MB, alloc=60.3MB, time=1.97 memory used=156.1MB, alloc=60.3MB, time=2.49 memory used=189.8MB, alloc=84.3MB, time=3.02 memory used=243.8MB, alloc=84.3MB, time=3.88 memory used=295.4MB, alloc=108.3MB, time=4.71 memory used=370.3MB, alloc=140.3MB, time=6.18 memory used=461.4MB, alloc=164.3MB, time=7.92 memory used=565.8MB, alloc=188.3MB, time=9.90 memory used=682.5MB, alloc=212.3MB, time=12.15 memory used=811.4MB, alloc=236.3MB, time=14.58 memory used=943.0MB, alloc=260.3MB, time=18.29 memory used=1079.9MB, alloc=284.3MB, time=22.85 memory used=1230.0MB, alloc=308.3MB, time=28.11 memory used=1391.8MB, alloc=332.3MB, time=34.61 memory used=1573.0MB, alloc=356.3MB, time=42.07 memory used=1778.1MB, alloc=380.3MB, time=50.46 memory used=2007.2MB, alloc=380.3MB, time=59.79 memory used=2236.2MB, alloc=404.3MB, time=69.12 memory used=2489.2MB, alloc=404.3MB, time=79.77 memory used=2742.1MB, alloc=404.3MB, time=90.86 memory used=2995.1MB, alloc=428.3MB, time=101.72 memory used=3271.9MB, alloc=428.3MB, time=114.59 memory used=3548.6MB, alloc=452.3MB, time=126.27 memory used=3849.3MB, alloc=452.3MB, time=138.54 N1 := 10305 > GB := Basis(F, plex(op(vars))); 2 GB := [98 x + 55, 33 y + 119, 11 z + 7] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=4153.2MB, alloc=452.3MB, time=149.75 N2 := 855 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-7 - 11 z, -14 x z + 5, 3 y - 17 z, -3 y - 11 y z, 5 z - 18 y, 2 4 x + 9 x y] > J:=[op(GB),op(G)]; J := [ 2 2 2 2 98 x + 55, 33 y + 119, 11 z + 7, -3 y - 11 y z, 5 z - 18 y, 4 x + 9 x y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/3, 2/3, 5/6, 1/4, 5/12, 5/12, 6, 9, 10, 2, 2, 2, 2, 1/3, 2/3, 1/2, 1/4, 5/12, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=4238.7MB, alloc=452.3MB, time=151.69 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317628 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-7 x y - 9 x, -17 y z - 3 y, 16 x z - 13 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [17, -15 + 19 z, -15 x z - 5 z ] > Problem := [F,G]; Problem := [[-7 x y - 9 x, -17 y z - 3 y, 16 x z - 13 y], 2 [17, -15 + 19 z, -15 x z - 5 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=48.3MB, alloc=32.3MB, time=0.89 memory used=67.9MB, alloc=56.3MB, time=1.26 memory used=107.4MB, alloc=84.3MB, time=2.06 memory used=162.6MB, alloc=84.3MB, time=3.99 N1 := 1453 > GB := Basis(F, plex(op(vars))); 2 GB := [112 x - 663 x, 221 y + 48 x, 17 x z + 3 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 225 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 [-7 x y - 9 x, -17 y z - 3 y, 16 z x - 13 y, 17, 19 z - 15, -15 x z - 5 z ] > J:=[op(GB),op(G)]; J := 2 2 [112 x - 663 x, 221 y + 48 x, 17 x z + 3 x, 17, 19 z - 15, -15 x z - 5 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 9, 2, 1, 1, 2, 1/2, 1/2, 2/3, 4/11, 4/11, 5/11, 6, 8, 8, 2, 2, 1, 2, 2/3, 1/6, 1/2, 6/11, 1/11, 4/11, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=201.9MB, alloc=84.3MB, time=4.82 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317634 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [12 x - 8 x, -3 x z + 11 x, -x + 16 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-14 x z + 14, 10 x - z, -4 y z - 18] > Problem := [F,G]; 2 Problem := [[12 x - 8 x, -3 x z + 11 x, -x + 16 y], 2 [-14 x z + 14, 10 x - z, -4 y z - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.51 memory used=48.2MB, alloc=32.3MB, time=0.94 memory used=68.1MB, alloc=56.3MB, time=1.33 memory used=108.4MB, alloc=84.3MB, time=2.17 memory used=166.0MB, alloc=84.3MB, time=4.07 N1 := 1315 > GB := Basis(F, plex(op(vars))); 2 GB := [3 x - 2 x, -x + 16 y, 3 x z - 11 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=219.3MB, alloc=84.3MB, time=5.07 memory used=278.0MB, alloc=108.3MB, time=6.16 N2 := 1315 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 12 x - 8 x, -3 x z + 11 x, -x + 16 y, -14 x z + 14, 10 x - z, -4 y z - 18 ] > J:=[op(GB),op(G)]; J := 2 2 [3 x - 2 x, -x + 16 y, 3 x z - 11 x, -14 x z + 14, 10 x - z, -4 y z - 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 1, 5/6, 1/3, 2/3, 7/12, 1/6, 1/3, 6, 11, 11, 2, 2, 1, 1, 5/6, 1/3, 2/3, 7/12, 1/6, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=343.1MB, alloc=108.3MB, time=8.25 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317644 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-17 - 6 x, -4 z + 10 x, -8 x + 12 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [19 x y - 15 y, -2 y z - 7 z , -9 - 6 x] > Problem := [F,G]; 2 Problem := [[-17 - 6 x, -4 z + 10 x, -8 x + 12 y], 2 [19 x y - 15 y, -2 y z - 7 z , -9 - 6 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.54 memory used=48.4MB, alloc=56.3MB, time=0.98 N1 := 485 > GB := Basis(F, plex(op(vars))); 2 GB := [6 x + 17, 9 y + 17, 12 z + 85] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 161 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-17 - 6 x, -4 z + 10 x, -8 x + 12 y, 19 x y - 15 y, -2 y z - 7 z , -9 - 6 x] > J:=[op(GB),op(G)]; 2 2 J := [6 x + 17, 9 y + 17, 12 z + 85, 19 x y - 15 y, -2 y z - 7 z , -9 - 6 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 9, 2, 1, 1, 2, 5/6, 1/2, 1/3, 5/12, 1/3, 1/4, 6, 8, 9, 2, 1, 1, 2, 1/2, 1/2, 1/3, 1/4, 1/3, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=89.1MB, alloc=60.3MB, time=1.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317646 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [16 x y - 19 x z, -3 x z + 10 y , 6 x y - 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [10 y - 9 y z, -16 x - 2 x z, -2 - 16 y] > Problem := [F,G]; 2 Problem := [[16 x y - 19 x z, -3 x z + 10 y , 6 x y - 16 x], 2 2 [10 y - 9 y z, -16 x - 2 x z, -2 - 16 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.78 memory used=67.1MB, alloc=32.3MB, time=1.06 memory used=86.5MB, alloc=56.3MB, time=1.40 memory used=128.1MB, alloc=60.3MB, time=2.16 memory used=165.3MB, alloc=84.3MB, time=2.85 memory used=221.2MB, alloc=108.3MB, time=4.11 memory used=288.5MB, alloc=132.3MB, time=6.63 N1 := 2115 > GB := Basis(F, plex(op(vars))); 2 2 GB := [9 x - 95 x, 3 x y - 8 x, 95 y - 64 x, 57 x z - 128 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=378.2MB, alloc=132.3MB, time=9.46 memory used=480.2MB, alloc=164.3MB, time=11.47 N2 := 1421 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [16 x y - 19 x z, -3 x z + 10 y , 6 x y - 16 x, 10 y - 9 y z, 2 -16 x - 2 x z, -2 - 16 y] > J:=[op(GB),op(G)]; 2 2 2 J := [9 x - 95 x, 3 x y - 8 x, 95 y - 64 x, 57 x z - 128 x, 10 y - 9 y z, 2 -16 x - 2 x z, -2 - 16 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 1, 2/3, 5/6, 2/3, 7/12, 1/2, 1/3, 7, 12, 13, 2, 2, 2, 1, 5/7, 4/7, 3/7, 9/14, 5/14, 3/14, 1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=543.3MB, alloc=164.3MB, time=13.72 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317662 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-7 y z + 8 x, 13 x y + 10 x z, 7 x z - 5 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-10 y z - 17, -12 y - 16 z, 17 y z - 10] > Problem := [F,G]; Problem := [[-7 y z + 8 x, 13 x y + 10 x z, 7 x z - 5 x], 2 [-10 y z - 17, -12 y - 16 z, 17 y z - 10]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=46.6MB, alloc=32.3MB, time=0.77 memory used=64.5MB, alloc=56.3MB, time=1.04 memory used=102.3MB, alloc=60.3MB, time=1.63 memory used=137.8MB, alloc=60.3MB, time=2.17 memory used=170.0MB, alloc=84.3MB, time=2.68 memory used=220.6MB, alloc=108.3MB, time=3.55 memory used=294.8MB, alloc=140.3MB, time=5.03 memory used=383.4MB, alloc=164.3MB, time=6.79 memory used=486.6MB, alloc=188.3MB, time=8.79 memory used=603.2MB, alloc=212.3MB, time=11.04 memory used=731.5MB, alloc=236.3MB, time=13.60 memory used=867.6MB, alloc=260.3MB, time=17.18 memory used=1003.0MB, alloc=284.3MB, time=21.52 memory used=1149.3MB, alloc=308.3MB, time=26.82 memory used=1307.6MB, alloc=332.3MB, time=33.15 memory used=1481.4MB, alloc=356.3MB, time=40.54 memory used=1679.2MB, alloc=380.3MB, time=48.69 memory used=1900.9MB, alloc=404.3MB, time=57.75 memory used=2146.5MB, alloc=404.3MB, time=67.66 memory used=2392.2MB, alloc=428.3MB, time=77.55 memory used=2661.8MB, alloc=428.3MB, time=88.48 memory used=2931.3MB, alloc=428.3MB, time=99.49 memory used=3200.8MB, alloc=452.3MB, time=110.53 memory used=3494.2MB, alloc=452.3MB, time=122.59 memory used=3787.4MB, alloc=476.3MB, time=134.47 memory used=4104.6MB, alloc=476.3MB, time=147.37 memory used=4422.2MB, alloc=500.3MB, time=160.72 N1 := 10945 > GB := Basis(F, plex(op(vars))); 2 GB := [364 x + 125 x, 91 x y + 50 x, 7 x z - 5 x, 7 y z - 8 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=4501.9MB, alloc=500.3MB, time=163.24 memory used=4912.6MB, alloc=756.3MB, time=176.47 N2 := 2911 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-7 z y + 8 x, 13 x y + 10 x z, 7 x z - 5 x, -10 y z - 17, -12 y - 16 z, 17 z y - 10] > J:=[op(GB),op(G)]; 2 J := [364 x + 125 x, 91 x y + 50 x, 7 x z - 5 x, 7 y z - 8 x, -10 y z - 17, 2 -12 y - 16 z, 17 z y - 10] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 1, 2, 1, 1/2, 5/6, 1, 5/12, 5/12, 1/2, 7, 14, 14, 2, 2, 2, 1, 4/7, 5/7, 5/7, 1/2, 5/14, 5/14, 0, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=4979.5MB, alloc=756.3MB, time=179.07 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317861 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-y z, 3 x z + 17 z , -11 z - 10 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [11 x + 7 y , 13 y z - 5 z , 19 x + z] > Problem := [F,G]; 2 2 Problem := [[-y z, 3 x z + 17 z , -11 z - 10 z], 2 2 2 [11 x + 7 y , 13 y z - 5 z , 19 x + z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=48.7MB, alloc=32.3MB, time=0.89 N1 := 509 > GB := Basis(F, plex(op(vars))); 2 GB := [33 x z - 170 z, y z, 11 z + 10 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=67.5MB, alloc=56.3MB, time=1.31 N2 := 347 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 2 2 [-y z, 3 x z + 17 z , -11 z - 10 z, 7 y + 11 x , 13 y z - 5 z , z + 19 x] > J:=[op(GB),op(G)]; 2 2 2 2 J := [33 x z - 170 z, y z, 11 z + 10 z, 7 y + 11 x , 13 y z - 5 z , z + 19 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 1/2, 1/2, 5/6, 3/13, 3/13, 8/13, 6, 11, 11, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/4, 2/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=107.0MB, alloc=60.3MB, time=1.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317863 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [20 x z - 16, 11 y - 19 y, 6 x - 10] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-9 x z + 13 y z, -18 - 5 x, -x y + 12 y z] > Problem := [F,G]; 2 2 Problem := [[20 x z - 16, 11 y - 19 y, 6 x - 10], [-9 x z + 13 y z, -18 - 5 x, -x y + 12 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=48.2MB, alloc=32.3MB, time=0.85 memory used=67.7MB, alloc=56.3MB, time=1.22 N1 := 659 > GB := Basis(F, plex(op(vars))); 2 2 GB := [3 x - 5, 11 y - 19 y, 25 z - 12 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=105.7MB, alloc=56.3MB, time=1.93 N2 := 491 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 x z - 16, 11 y - 19 y, 6 x - 10, -9 x z + 13 y z, -18 - 5 x, -x y + 12 y z] > J:=[op(GB),op(G)]; 2 2 J := [3 x - 5, 11 y - 19 y, 25 z - 12 x, -9 x z + 13 y z, -18 - 5 x, -x y + 12 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 1, 5/6, 1/2, 1/2, 5/12, 5/12, 1/3, 6, 11, 10, 2, 2, 2, 1, 5/6, 1/2, 1/2, 5/12, 5/12, 1/3, 0, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=136.8MB, alloc=56.3MB, time=2.52 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317866 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [4 x - 9 x z, -7 x z - 15, 2 x y - 7 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-7 x - 18 x, -16 x z + 18 y z, 17 y - 16 y z] > Problem := [F,G]; 2 Problem := [[4 x - 9 x z, -7 x z - 15, 2 x y - 7 y], 2 2 [-7 x - 18 x, -16 x z + 18 y z, 17 y - 16 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.47 memory used=49.0MB, alloc=32.3MB, time=0.87 N1 := 463 > GB := Basis(F, plex(op(vars))); 2 GB := [28 x + 135, y, 9 z - 4 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=68.0MB, alloc=56.3MB, time=1.27 N2 := 193 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [4 x - 9 x z, -7 x z - 15, 2 x y - 7 y, -7 x - 18 x, -16 x z + 18 y z, 2 17 y - 16 y z] > J:=[op(GB),op(G)]; J := 2 2 2 [28 x + 135, y, 9 z - 4 x, -7 x - 18 x, -16 x z + 18 y z, 17 y - 16 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 1, 5/6, 1/2, 2/3, 7/12, 5/12, 5/12, 6, 10, 10, 2, 2, 2, 1, 2/3, 1/2, 1/2, 5/11, 4/11, 4/11, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=89.7MB, alloc=56.3MB, time=1.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317868 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-x z + 16, -3 x , -16 x y - 20 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [14 x z + 2 x, 7 x z + z, 16 y z + 12 y] > Problem := [F,G]; 2 Problem := [[-x z + 16, -3 x , -16 x y - 20 x], [14 x z + 2 x, 7 x z + z, 16 y z + 12 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.7MB, alloc=32.3MB, time=0.55 N1 := 375 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.6MB, alloc=32.3MB, time=0.94 N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 H := [-x z + 16, -3 x , -16 x y - 20 x, 14 x z + 2 x, 7 x z + z, 16 y z + 12 y] > J:=[op(GB),op(G)]; J := [1, 14 x z + 2 x, 7 x z + z, 16 y z + 12 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 1, 5/6, 1/3, 2/3, 7/12, 1/4, 5/12, 4, 6, 6, 2, 1, 1, 1, 1/2, 1/4, 3/4, 3/7, 2/7, 4/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=55.1MB, alloc=32.3MB, time=1.05 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317869 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-13 y + 4, -4 x - 9 y , -18 y z - 2] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-18 z + 12 x, -3 x - 12 y , -10 x + 17 x] > Problem := [F,G]; 2 2 2 Problem := [[-13 y + 4, -4 x - 9 y , -18 y z - 2], 2 2 2 2 [-18 z + 12 x, -3 x - 12 y , -10 x + 17 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.48 memory used=48.8MB, alloc=32.3MB, time=0.86 memory used=69.2MB, alloc=56.3MB, time=1.23 N1 := 455 > GB := Basis(F, plex(op(vars))); 2 2 GB := [13 x + 9, 13 y - 4, 36 z + 13 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=109.0MB, alloc=60.3MB, time=1.96 N2 := 345 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [-13 y + 4, -4 x - 9 y , -18 y z - 2, -18 z + 12 x, -3 x - 12 y , 2 -10 x + 17 x] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [13 x + 9, 13 y - 4, 36 z + 13 y, -18 z + 12 x, -3 x - 12 y , 2 -10 x + 17 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 2, 2/3, 2/3, 1/3, 5/12, 1/3, 1/6, 6, 9, 11, 2, 2, 2, 2, 2/3, 1/2, 1/3, 5/12, 1/4, 1/6, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=123.3MB, alloc=60.3MB, time=2.24 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317872 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [5 - 10 z, 2 x z - 3 y z, -11 x y - 2 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x + 8 z, 17 + 5 z, 14 y z + 4 z] > Problem := [F,G]; Problem := [[5 - 10 z, 2 x z - 3 y z, -11 x y - 2 y], 2 [-7 x + 8 z, 17 + 5 z, 14 y z + 4 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=56.2MB, alloc=68.3MB, time=1.04 N1 := 619 > GB := Basis(F, plex(op(vars))); 2 GB := [11 x + 2 x, -2 x + 3 y, 2 z - 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=102.8MB, alloc=68.3MB, time=1.90 N2 := 447 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 5 - 10 z, 2 x z - 3 y z, -11 x y - 2 y, -7 x + 8 z, 5 z + 17, 14 y z + 4 z ] > J:=[op(GB),op(G)]; 2 2 J := [11 x + 2 x, -2 x + 3 y, 2 z - 1, -7 x + 8 z, 5 z + 17, 14 y z + 4 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 1, 1, 1/2, 1/2, 5/6, 1/4, 1/3, 7/12, 6, 9, 9, 2, 2, 1, 1, 1/2, 1/3, 2/3, 1/3, 1/6, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=118.3MB, alloc=68.3MB, time=2.20 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317874 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [15 y - 2 z, 4 x - 16 x, -7 y z + 18] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 2 G := [-x - 18 z , 3 x + 8 z , -8 z - 18 y] > Problem := [F,G]; 2 2 Problem := [[15 y - 2 z, 4 x - 16 x, -7 y z + 18], 2 2 2 2 2 [-x - 18 z , 3 x + 8 z , -8 z - 18 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.8MB, alloc=32.3MB, time=0.52 memory used=48.7MB, alloc=32.3MB, time=0.86 memory used=68.9MB, alloc=32.3MB, time=1.16 memory used=88.4MB, alloc=56.3MB, time=1.49 memory used=127.2MB, alloc=60.3MB, time=2.09 memory used=164.2MB, alloc=60.3MB, time=2.70 memory used=199.8MB, alloc=84.3MB, time=3.30 memory used=256.1MB, alloc=92.3MB, time=4.20 memory used=310.0MB, alloc=116.3MB, time=5.14 memory used=385.7MB, alloc=140.3MB, time=6.63 N1 := 957 > GB := Basis(F, plex(op(vars))); 2 3 2 GB := [x - 4 x, 35 y - 12, -15 y + 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=474.5MB, alloc=140.3MB, time=8.52 memory used=576.1MB, alloc=140.3MB, time=10.28 N2 := 535 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [15 y - 2 z, 4 x - 16 x, -7 y z + 18, -x - 18 z , 8 z + 3 x , 2 -8 z - 18 y] > J:=[op(GB),op(G)]; J := [ 2 3 2 2 2 2 2 2 x - 4 x, 35 y - 12, -15 y + 2 z, -x - 18 z , 8 z + 3 x , -8 z - 18 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/3, 1/4, 5/12, 6, 10, 13, 3, 2, 3, 2, 1/2, 1/2, 2/3, 1/3, 1/4, 1/3, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=596.5MB, alloc=140.3MB, time=10.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317886 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 x y + 10 z , 8 x - 14 z, 13 x z - 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [13 x , -7 y z - 19 z, -11 x - 2 y] > Problem := [F,G]; 2 Problem := [[-12 x y + 10 z , 8 x - 14 z, 13 x z - 20 z], 2 2 [13 x , -7 y z - 19 z, -11 x - 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=58.0MB, alloc=68.3MB, time=1.11 N1 := 723 > GB := Basis(F, plex(op(vars))); 2 GB := [13 x - 20 x, 1911 x y - 800 x, 7 z - 4 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.3MB, alloc=68.3MB, time=2.15 N2 := 281 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-12 x y + 10 z , 8 x - 14 z, 13 x z - 20 z, 13 x , -7 y z - 19 z, 2 -11 x - 2 y] > J:=[op(GB),op(G)]; 2 2 J := [13 x - 20 x, 1911 x y - 800 x, 7 z - 4 x, 13 x , -7 y z - 19 z, 2 -11 x - 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 1, 2, 5/6, 1/2, 2/3, 5/12, 1/4, 1/2, 6, 10, 11, 2, 2, 1, 1, 5/6, 1/2, 1/3, 7/12, 1/4, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=124.5MB, alloc=68.3MB, time=2.48 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317889 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [8 y z - z , 20 z + 18 x, -14 x y - 16 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-4 x y + 8 y, -18 x z - 14 x, -9 y - 9 z ] > Problem := [F,G]; 2 2 2 Problem := [[8 y z - z , 20 z + 18 x, -14 x y - 16 z ], 2 2 [-4 x y + 8 y, -18 x z - 14 x, -9 y - 9 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.81 memory used=67.2MB, alloc=32.3MB, time=1.11 memory used=86.5MB, alloc=56.3MB, time=1.42 memory used=125.1MB, alloc=60.3MB, time=2.02 memory used=160.3MB, alloc=84.3MB, time=2.58 memory used=220.3MB, alloc=84.3MB, time=3.73 memory used=273.8MB, alloc=108.3MB, time=4.78 memory used=345.6MB, alloc=132.3MB, time=6.15 memory used=432.2MB, alloc=164.3MB, time=8.01 memory used=527.4MB, alloc=188.3MB, time=10.81 memory used=631.2MB, alloc=212.3MB, time=14.74 memory used=756.4MB, alloc=212.3MB, time=19.77 memory used=881.6MB, alloc=236.3MB, time=24.70 memory used=1030.8MB, alloc=236.3MB, time=30.44 N1 := 4555 > GB := Basis(F, plex(op(vars))); GB := [ 2 2 245 x + 18432 x, 35 x y - 36 x, 35 x z - 288 x, 80 y z + 9 x, 10 z + 9 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1181.8MB, alloc=236.3MB, time=34.41 memory used=1278.5MB, alloc=492.3MB, time=36.35 N2 := 1509 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [8 y z - z , 20 z + 18 x, -14 x y - 16 z , -4 x y + 8 y, -18 x z - 14 x, 2 2 -9 y - 9 z ] > J:=[op(GB),op(G)]; 2 J := [245 x + 18432 x, 35 x y - 36 x, 35 x z - 288 x, 80 z y + 9 x, 2 2 2 10 z + 9 x, -4 x y + 8 y, -18 x z - 14 x, -9 y - 9 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 1, 2, 2, 2/3, 2/3, 5/6, 5/12, 5/12, 1/2, 8, 16, 16, 2, 2, 2, 2, 7/8, 1/2, 5/8, 11/16, 5/16, 5/16, -3, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1434.7MB, alloc=492.3MB, time=40.97 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428317938 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-12 z + 6 x, 14 x - y , -9 - 20 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-3 y z + 17 y, -19 y z - 4 x, 2 y z + 4] > Problem := [F,G]; 2 2 2 Problem := [[-12 z + 6 x, 14 x - y , -9 - 20 y], [-3 y z + 17 y, -19 y z - 4 x, 2 y z + 4]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.51 memory used=47.7MB, alloc=32.3MB, time=0.85 memory used=67.8MB, alloc=32.3MB, time=1.14 memory used=86.9MB, alloc=56.3MB, time=1.47 memory used=129.0MB, alloc=60.3MB, time=2.32 memory used=166.7MB, alloc=84.3MB, time=3.07 memory used=224.6MB, alloc=108.3MB, time=4.13 memory used=300.5MB, alloc=140.3MB, time=5.55 memory used=391.1MB, alloc=164.3MB, time=7.40 memory used=489.5MB, alloc=188.3MB, time=10.34 memory used=597.0MB, alloc=212.3MB, time=14.44 memory used=723.7MB, alloc=212.3MB, time=19.53 memory used=850.4MB, alloc=236.3MB, time=24.44 memory used=1001.0MB, alloc=236.3MB, time=30.29 memory used=1151.7MB, alloc=260.3MB, time=36.46 N1 := 5139 > GB := Basis(F, plex(op(vars))); 2 2 GB := [5600 x - 81, 20 y + 9, 2 z - x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1324.0MB, alloc=260.3MB, time=41.28 memory used=1526.2MB, alloc=540.3MB, time=46.17 memory used=1713.0MB, alloc=564.3MB, time=54.09 N2 := 2971 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-12 z + 6 x, -y + 14 x , -9 - 20 y, -3 y z + 17 y, -19 y z - 4 x, 2 y z + 4] > J:=[op(GB),op(G)]; J := 2 2 [5600 x - 81, 20 y + 9, 2 z - x, -3 y z + 17 y, -19 y z - 4 x, 2 y z + 4] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 1/2, 5/6, 2/3, 1/4, 1/2, 1/3, 6, 11, 11, 2, 2, 1, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 1/3, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1751.3MB, alloc=564.3MB, time=55.46 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318007 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-9 x y - 5 y, 20 x - 8 x y, -8 x - 13] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-18 y z - 19 y, -8 x z + 12 z, -6 y z - 15 x] > Problem := [F,G]; 2 2 Problem := [[-9 x y - 5 y, 20 x - 8 x y, -8 x - 13], [-18 y z - 19 y, -8 x z + 12 z, -6 y z - 15 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.1MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.52 N1 := 285 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.4MB, alloc=32.3MB, time=0.90 N2 := 139 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-9 x y - 5 y, 20 x - 8 x y, -8 x - 13, -18 y z - 19 y, -8 x z + 12 z, -6 y z - 15 x] > J:=[op(GB),op(G)]; J := [1, -18 y z - 19 y, -8 x z + 12 z, -6 y z - 15 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 1, 5/6, 2/3, 1/2, 1/2, 1/2, 1/3, 4, 7, 6, 2, 1, 1, 1, 1/2, 1/2, 3/4, 2/7, 3/7, 4/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=55.5MB, alloc=32.3MB, time=1.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318009 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 z + 15 z, 4 x y - 5 z, 20 - 18 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-9 x z + 15, 3 x z - 3 z , -2 x - 15 z ] > Problem := [F,G]; 2 Problem := [[-11 z + 15 z, 4 x y - 5 z, 20 - 18 z], 2 2 2 [-9 x z + 15, 3 x z - 3 z , -2 x - 15 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.0MB, alloc=32.3MB, time=0.80 memory used=66.8MB, alloc=32.3MB, time=1.10 memory used=86.1MB, alloc=56.3MB, time=1.47 memory used=126.8MB, alloc=56.3MB, time=2.23 memory used=161.8MB, alloc=84.3MB, time=2.87 memory used=211.9MB, alloc=108.3MB, time=4.55 N1 := 1617 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 41 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [-11 z + 15 z, 4 y x - 5 z, 20 - 18 z, -9 x z + 15, 3 x z - 3 z , 2 2 -2 x - 15 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [1, -9 x z + 15, 3 x z - 3 z , -2 x - 15 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 2/3, 1/6, 1, 1/3, 1/12, 2/3, 4, 6, 6, 2, 2, 0, 2, 3/4, 0, 3/4, 3/7, 0, 4/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=252.1MB, alloc=108.3MB, time=5.67 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318015 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [10 x + 7 x, -9 x - 7 y , -7 y + 16 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-5 y z - 13 z , 15 x + 5 z , -5 x z + 9 y] > Problem := [F,G]; 2 2 2 2 Problem := [[10 x + 7 x, -9 x - 7 y , -7 y + 16 x], 2 2 2 [-5 y z - 13 z , 15 x + 5 z , -5 x z + 9 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=69.3MB, alloc=56.3MB, time=1.22 N1 := 455 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=110.4MB, alloc=60.3MB, time=1.96 N2 := 111 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 2 H := [10 x + 7 x, -9 x - 7 y , -7 y + 16 x, -5 y z - 13 z , 15 x + 5 z , -5 x z + 9 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x, y , -5 y z - 13 z , 15 x + 5 z , -5 x z + 9 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 2/3, 1/2, 1/2, 1/3, 1/3, 5, 9, 9, 2, 2, 2, 2, 3/5, 3/5, 3/5, 1/3, 1/3, 4/9, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=112.1MB, alloc=60.3MB, time=2.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318018 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-16 x + 14 z, 16 x - 14, -y z - 10 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [8 x - 16 z , 15 x + 12 z , -8 x y + 16 x] > Problem := [F,G]; 2 2 2 Problem := [[-16 x + 14 z, 16 x - 14, -y z - 10 z ], 2 2 2 2 [8 x - 16 z , 15 x + 12 z , -8 x y + 16 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.52 memory used=47.5MB, alloc=32.3MB, time=0.84 memory used=69.2MB, alloc=56.3MB, time=1.27 memory used=113.6MB, alloc=56.3MB, time=2.09 memory used=151.1MB, alloc=84.3MB, time=2.86 memory used=203.1MB, alloc=108.3MB, time=4.73 N1 := 1485 > GB := Basis(F, plex(op(vars))); 2 GB := [8 x - 7, y + 10, z - 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 355 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 2 H := [-16 x + 14 z, 16 x - 14, -y z - 10 z , 8 x - 16 z , 15 x + 12 z , -8 x y + 16 x] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [8 x - 7, y + 10, z - 1, 8 x - 16 z , 15 x + 12 z , -8 x y + 16 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 1, 2, 5/6, 1/3, 2/3, 1/2, 1/6, 5/12, 6, 9, 10, 2, 2, 1, 2, 2/3, 1/3, 1/2, 5/12, 1/6, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=259.7MB, alloc=108.3MB, time=5.93 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318026 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-10 - 7 x, y z - 3 z , -20 x + 5] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [8 z , 5 x y - 15 z , -14 x y + 8 y z] > Problem := [F,G]; Problem := [ 2 2 2 2 [-10 - 7 x, y z - 3 z , -20 x + 5], [8 z , 5 x y - 15 z , -14 x y + 8 y z] ] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=49.4MB, alloc=32.3MB, time=0.90 memory used=68.0MB, alloc=56.3MB, time=1.31 N1 := 677 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 79 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-10 - 7 x, y z - 3 z , -20 x + 5, 8 z , 5 x y - 15 z , -14 x y + 8 y z] > J:=[op(GB),op(G)]; 2 2 J := [1, 8 z , 5 x y - 15 z , -14 x y + 8 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 2/3, 1/2, 2/3, 1/3, 1/3, 5/12, 4, 7, 6, 2, 1, 1, 2, 1/2, 1/2, 3/4, 2/7, 3/7, 3/7, 4, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=87.6MB, alloc=56.3MB, time=1.76 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318028 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [8 x y + 8 x, -10 y + 13 z , 16 y + 18 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [10 x y + 8 x z, -12 - 3 y, -16 x z - 17 z ] > Problem := [F,G]; 2 2 2 Problem := [[8 x y + 8 x, -10 y + 13 z , 16 y + 18 x], 2 [10 x y + 8 x z, -12 - 3 y, -16 x z - 17 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=25.8MB, alloc=32.3MB, time=0.48 memory used=47.1MB, alloc=32.3MB, time=0.79 memory used=67.8MB, alloc=56.3MB, time=1.15 memory used=111.8MB, alloc=60.3MB, time=1.99 memory used=149.6MB, alloc=84.3MB, time=2.71 memory used=205.3MB, alloc=108.3MB, time=3.75 memory used=273.8MB, alloc=132.3MB, time=5.55 memory used=353.3MB, alloc=156.3MB, time=8.54 memory used=454.7MB, alloc=156.3MB, time=12.37 memory used=556.2MB, alloc=156.3MB, time=16.30 N1 := 3445 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [9 x + 8 x, x y + x, 8 y + 9 x, 52 z + 45 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=657.8MB, alloc=164.3MB, time=18.82 memory used=772.1MB, alloc=188.3MB, time=20.97 memory used=901.1MB, alloc=212.3MB, time=25.13 memory used=1035.2MB, alloc=236.3MB, time=30.65 N2 := 2931 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [8 x y + 8 x, -10 y + 13 z , 16 y + 18 x, 10 x y + 8 x z, -12 - 3 y, 2 -16 x z - 17 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [9 x + 8 x, x y + x, 8 y + 9 x, 52 z + 45 x, 10 x y + 8 x z, -12 - 3 y, 2 -16 x z - 17 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 2/3, 5/6, 1/2, 1/2, 5/12, 1/3, 7, 13, 13, 2, 2, 2, 2, 6/7, 4/7, 3/7, 9/14, 2/7, 2/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1088.8MB, alloc=236.3MB, time=32.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318067 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-5 z + 13 x, -4 - 4 x, 17 z - 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [10 y + 1, 15 x + 9 y , x z] > Problem := [F,G]; Problem := 2 2 2 2 2 [[-5 z + 13 x, -4 - 4 x, 17 z - 19 y], [10 y + 1, 15 x + 9 y , x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 N1 := 237 > GB := Basis(F, plex(op(vars))); 2 GB := [x + 1, 95 y + 221, 5 z + 13] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.5MB, alloc=32.3MB, time=0.90 N2 := 87 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-5 z + 13 x, -4 - 4 x, 17 z - 19 y, 10 y + 1, 15 x + 9 y , x z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x + 1, 95 y + 221, 5 z + 13, 10 y + 1, 15 x + 9 y , x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 2/3, 1/2, 1/2, 1/3, 1/4, 1/4, 6, 8, 10, 2, 2, 2, 2, 1/2, 1/2, 1/3, 1/4, 1/4, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=65.6MB, alloc=32.3MB, time=1.15 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318068 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [19 x z + 9 y z, 18 z + 12, -8 y + 4 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [16 x y + 9 z, -12 x + 5 y, 8 x z + y] > Problem := [F,G]; 2 2 2 Problem := [[19 x z + 9 y z, 18 z + 12, -8 y + 4 z ], [16 x y + 9 z, -12 x + 5 y, 8 x z + y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.51 memory used=47.8MB, alloc=32.3MB, time=0.81 memory used=68.1MB, alloc=32.3MB, time=1.13 memory used=88.8MB, alloc=56.3MB, time=1.53 memory used=130.3MB, alloc=60.3MB, time=2.30 N1 := 911 > GB := Basis(F, plex(op(vars))); 2 2 GB := [361 x + 27, 9 y + 19 x, 3 z + 2] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=164.3MB, alloc=60.3MB, time=3.26 memory used=201.5MB, alloc=84.3MB, time=3.88 N2 := 171 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [19 x z + 9 y z, 18 z + 12, -8 y + 4 z , 16 y x + 9 z, -12 x + 5 y, 8 z x + y] > J:=[op(GB),op(G)]; 2 2 J := [361 x + 27, 9 y + 19 x, 3 z + 2, 16 y x + 9 z, -12 x + 5 y, 8 z x + y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 1, 2, 2, 2/3, 5/6, 5/6, 1/3, 5/12, 1/2, 6, 12, 10, 2, 2, 1, 2, 5/6, 2/3, 1/2, 5/12, 1/3, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=204.7MB, alloc=84.3MB, time=3.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318073 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 x - 11 y, -9 x y - 12 x z, 11 x + 4 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-8 z + 9 z, -8 x y - 13 z, 2 x y + 5 x z] > Problem := [F,G]; 2 Problem := [[-8 x - 11 y, -9 x y - 12 x z, 11 x + 4 y z], 2 [-8 z + 9 z, -8 x y - 13 z, 2 x y + 5 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.78 memory used=67.5MB, alloc=32.3MB, time=1.08 memory used=86.6MB, alloc=56.3MB, time=1.39 memory used=125.0MB, alloc=60.3MB, time=1.97 memory used=159.3MB, alloc=84.3MB, time=2.51 memory used=211.2MB, alloc=108.3MB, time=3.47 memory used=284.5MB, alloc=140.3MB, time=4.84 memory used=373.4MB, alloc=164.3MB, time=6.52 memory used=475.6MB, alloc=188.3MB, time=8.41 memory used=590.0MB, alloc=212.3MB, time=10.56 memory used=700.0MB, alloc=492.3MB, time=12.68 memory used=830.1MB, alloc=516.3MB, time=16.24 memory used=963.4MB, alloc=540.3MB, time=20.56 memory used=1108.3MB, alloc=564.3MB, time=25.62 memory used=1266.9MB, alloc=588.3MB, time=31.40 memory used=1437.8MB, alloc=612.3MB, time=38.31 memory used=1628.3MB, alloc=636.3MB, time=46.34 memory used=1842.8MB, alloc=660.3MB, time=55.45 memory used=2081.2MB, alloc=684.3MB, time=65.66 memory used=2343.5MB, alloc=684.3MB, time=76.72 memory used=2605.9MB, alloc=684.3MB, time=87.85 memory used=2868.2MB, alloc=708.3MB, time=98.78 memory used=3154.4MB, alloc=708.3MB, time=110.58 memory used=3440.5MB, alloc=708.3MB, time=122.46 memory used=3726.5MB, alloc=732.3MB, time=134.28 memory used=4036.5MB, alloc=732.3MB, time=147.06 memory used=4346.4MB, alloc=732.3MB, time=159.74 memory used=4656.3MB, alloc=756.3MB, time=172.54 memory used=4990.1MB, alloc=756.3MB, time=186.32 memory used=5323.8MB, alloc=780.3MB, time=200.05 N1 := 12709 > GB := Basis(F, plex(op(vars))); 2 GB := [x , 11 y + 8 x, x z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=5687.9MB, alloc=780.3MB, time=213.84 N2 := 679 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-8 x - 11 y, -9 x y - 12 x z, 4 z y + 11 x , -8 z + 9 z, -8 x y - 13 z, 2 x y + 5 x z] > J:=[op(GB),op(G)]; 2 2 J := [x , 11 y + 8 x, x z, -8 z + 9 z, -8 x y - 13 z, 2 x y + 5 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 11, 2, 2, 1, 2, 5/6, 5/6, 5/6, 7/12, 5/12, 1/2, 6, 12, 11, 2, 2, 1, 2, 5/6, 1/2, 2/3, 1/2, 1/4, 5/12, 3, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=5715.6MB, alloc=780.3MB, time=214.70 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318310 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-14 z - 11, -18 y z + 20 z , y - 3 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-8 x y + 17 x, 19 x + 16 y , -10 x z - 17 z ] > Problem := [F,G]; 2 2 2 2 Problem := [[-14 z - 11, -18 y z + 20 z , y - 3 z ], 2 2 2 [-8 x y + 17 x, 19 x + 16 y , -10 x z - 17 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=31.5MB, alloc=40.3MB, time=0.60 memory used=59.6MB, alloc=40.3MB, time=1.04 memory used=86.8MB, alloc=64.3MB, time=1.55 memory used=136.3MB, alloc=68.3MB, time=2.49 memory used=178.3MB, alloc=92.3MB, time=3.37 memory used=233.3MB, alloc=116.3MB, time=5.32 N1 := 1717 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 45 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 2 2 H := [-14 z - 11, -18 y z + 20 z , -3 z + y , -8 x y + 17 x, 16 y + 19 x , 2 -10 x z - 17 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [1, -8 x y + 17 x, 16 y + 19 x , -10 x z - 17 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/3, 1/3, 1/2, 4, 6, 6, 2, 2, 2, 2, 3/4, 1/2, 1/4, 4/7, 2/7, 2/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=278.3MB, alloc=116.3MB, time=6.60 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318318 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-2 y z + 13 z , 17 x y + 13, -19 y z - 11 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [-18 x + 20 x, 5 x y - 12 y , -2 y - 13 z ] > Problem := [F,G]; 2 Problem := [[-2 y z + 13 z , 17 x y + 13, -19 y z - 11 y], 2 2 2 2 [-18 x + 20 x, 5 x y - 12 y , -2 y - 13 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.50 memory used=47.5MB, alloc=32.3MB, time=0.84 memory used=68.5MB, alloc=56.3MB, time=1.25 N1 := 475 > GB := Basis(F, plex(op(vars))); GB := [187 x - 38, 38 y + 143, 19 z + 11] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.0MB, alloc=60.3MB, time=1.98 N2 := 195 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-2 y z + 13 z , 17 y x + 13, -19 y z - 11 y, -18 x + 20 x, 5 x y - 12 y , 2 2 -2 y - 13 z ] > J:=[op(GB),op(G)]; 2 2 J := [187 x - 38, 38 y + 143, 19 z + 11, -18 x + 20 x, 5 x y - 12 y , 2 2 -2 y - 13 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 5/6, 1/2, 1/3, 7/12, 1/3, 6, 8, 9, 2, 2, 2, 2, 1/2, 1/2, 1/3, 1/3, 1/3, 1/6, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=119.6MB, alloc=60.3MB, time=2.20 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318321 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [2 x z + 5 z , 5 x - 15 y, -9 y z - 14 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [7 z, 6 x + 11, 6 x z - 15 z] > Problem := [F,G]; Problem := [ 2 2 2 [2 x z + 5 z , 5 x - 15 y, -9 y z - 14 y], [7 z, 6 x + 11, 6 x z - 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.53 N1 := 215 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 2 GB := [9 x - 35 x , -x + 3 y, 9 x z + 14 x , 2 x z + 5 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=46.6MB, alloc=32.3MB, time=0.87 N2 := 135 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [2 x z + 5 z , 5 x - 15 y, -9 y z - 14 y, 7 z, 6 x + 11, 6 x z - 15 z] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 2 J := [9 x - 35 x , -x + 3 y, 9 x z + 14 x , 2 x z + 5 z , 7 z, 6 x + 11, 6 x z - 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 1, 2, 2/3, 1/3, 2/3, 1/3, 1/4, 1/2, 7, 11, 15, 3, 3, 1, 2, 6/7, 1/7, 4/7, 4/7, 1/14, 3/7, -1, -4, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=48.4MB, alloc=32.3MB, time=0.91 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318322 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [20 + 3 x, -14 y - 11 z , x y + 16 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [10 x z + 5 z, 13 x z + 11 z , -9 x y - 9 y ] > Problem := [F,G]; 2 2 Problem := [[20 + 3 x, -14 y - 11 z , x y + 16 x z], 2 2 [10 x z + 5 z, 13 x z + 11 z , -9 x y - 9 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.50 N1 := 283 > GB := Basis(F, plex(op(vars))); 2 GB := [3 x + 20, y , 16 z + y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.6MB, alloc=32.3MB, time=0.93 memory used=68.4MB, alloc=56.3MB, time=1.26 N2 := 283 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [3 x + 20, -14 y - 11 z , x y + 16 x z, 10 x z + 5 z, 13 x z + 11 z , 2 -9 x y - 9 y ] > J:=[op(GB),op(G)]; 2 2 2 J := [3 x + 20, y , 16 z + y, 10 x z + 5 z, 13 x z + 11 z , -9 x y - 9 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 2, 2, 5/6, 1/2, 2/3, 1/2, 1/3, 1/2, 6, 10, 10, 2, 1, 2, 2, 2/3, 1/2, 1/2, 1/3, 1/3, 5/12, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=78.7MB, alloc=56.3MB, time=1.46 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318323 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [3 y z - 4 x, x z - 14 y , 6 x - 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-7 x + 13 z, 14 + 16 x, -18 z + 1] > Problem := [F,G]; 2 Problem := [[3 y z - 4 x, x z - 14 y , 6 x - 5 z], 2 2 [-7 x + 13 z, 14 + 16 x, -18 z + 1]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.51 memory used=47.8MB, alloc=32.3MB, time=0.83 memory used=67.4MB, alloc=32.3MB, time=1.13 memory used=87.4MB, alloc=56.3MB, time=1.45 memory used=127.1MB, alloc=60.3MB, time=2.08 memory used=166.3MB, alloc=84.3MB, time=2.74 memory used=228.7MB, alloc=108.3MB, time=3.89 memory used=305.4MB, alloc=140.3MB, time=5.38 memory used=404.3MB, alloc=140.3MB, time=7.08 memory used=491.5MB, alloc=164.3MB, time=8.69 memory used=592.0MB, alloc=188.3MB, time=10.58 memory used=705.8MB, alloc=212.3MB, time=12.81 memory used=822.5MB, alloc=236.3MB, time=16.20 memory used=948.1MB, alloc=260.3MB, time=20.32 memory used=1086.7MB, alloc=284.3MB, time=25.11 memory used=1235.9MB, alloc=308.3MB, time=31.08 memory used=1407.5MB, alloc=332.3MB, time=38.06 memory used=1603.1MB, alloc=356.3MB, time=46.03 memory used=1822.6MB, alloc=356.3MB, time=55.03 memory used=2042.1MB, alloc=356.3MB, time=64.03 memory used=2261.5MB, alloc=380.3MB, time=72.92 memory used=2504.9MB, alloc=380.3MB, time=82.77 memory used=2748.3MB, alloc=380.3MB, time=93.54 memory used=2991.6MB, alloc=404.3MB, time=103.77 memory used=3258.6MB, alloc=404.3MB, time=114.72 memory used=3525.7MB, alloc=428.3MB, time=125.38 memory used=3816.8MB, alloc=452.3MB, time=138.10 N1 := 10215 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [243 x - 3500 x, 9 x y - 10 x, -3 x + 35 y , -6 x + 5 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=3966.0MB, alloc=452.3MB, time=142.88 N2 := 1063 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 [3 y z - 4 x, z x - 14 y , -5 z + 6 x, -7 x + 13 z, 14 + 16 x, -18 z + 1] > J:=[op(GB),op(G)]; 3 2 2 2 J := [243 x - 3500 x, 9 x y - 10 x, -3 x + 35 y , -6 x + 5 z, -7 x + 13 z, 2 14 + 16 x, -18 z + 1] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 2, 2, 5/6, 1/3, 5/6, 5/12, 1/6, 5/12, 7, 11, 13, 3, 3, 2, 2, 6/7, 2/7, 3/7, 4/7, 1/7, 3/14, 1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=4016.9MB, alloc=708.3MB, time=144.61 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318497 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [x z - 18 y z, -19 x + 19 z, 12 x y + 7] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-16 y, -19 y + 18 z, 4 y z] > Problem := [F,G]; Problem := 2 2 [[x z - 18 y z, -19 x + 19 z, 12 x y + 7], [-16 y, -19 y + 18 z, 4 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=27.2MB, alloc=32.3MB, time=0.57 N1 := 411 > GB := Basis(F, plex(op(vars))); memory used=48.6MB, alloc=32.3MB, time=1.01 2 GB := [2 x + 21, 18 y - x, 2 z + 21] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 85 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [x z - 18 y z, -19 x + 19 z, 12 y x + 7, -16 y, -19 y + 18 z, 4 y z] > J:=[op(GB),op(G)]; 2 2 J := [2 x + 21, 18 y - x, 2 z + 21, -16 y, -19 y + 18 z, 4 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 1/2, 5/6, 2/3, 3/13, 5/13, 5/13, 6, 9, 9, 2, 2, 2, 1, 1/3, 2/3, 1/2, 2/13, 4/13, 3/13, 3, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=65.2MB, alloc=32.3MB, time=1.25 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318498 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 y z - 6 x, 8 y z - 12 y, 11 x z + 15 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-5 x y - 19, -11 x z - 7 y, -20 x - x] > Problem := [F,G]; 2 Problem := [[-11 y z - 6 x, 8 y z - 12 y, 11 x z + 15 z ], 2 [-5 x y - 19, -11 x z - 7 y, -20 x - x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.4MB, alloc=32.3MB, time=0.81 memory used=67.8MB, alloc=32.3MB, time=1.12 memory used=87.3MB, alloc=56.3MB, time=1.46 memory used=128.9MB, alloc=60.3MB, time=2.28 memory used=165.5MB, alloc=84.3MB, time=3.00 memory used=222.0MB, alloc=108.3MB, time=4.03 memory used=295.1MB, alloc=140.3MB, time=5.56 memory used=381.2MB, alloc=164.3MB, time=8.24 memory used=476.1MB, alloc=188.3MB, time=12.03 memory used=588.6MB, alloc=188.3MB, time=16.34 memory used=701.2MB, alloc=188.3MB, time=20.59 memory used=813.6MB, alloc=212.3MB, time=25.11 memory used=950.3MB, alloc=236.3MB, time=30.59 N1 := 4433 > GB := Basis(F, plex(op(vars))); 2 2 GB := [22 x + 45 x, 11 y + 4 x, 2 x z - 3 x, 10 z + 11 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1061.6MB, alloc=236.3MB, time=32.81 N2 := 1263 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-11 y z - 6 x, 8 y z - 12 y, 11 x z + 15 z , -5 x y - 19, -11 x z - 7 y, 2 -20 x - x] > J:=[op(GB),op(G)]; 2 2 J := [22 x + 45 x, 11 y + 4 x, 2 x z - 3 x, 10 z + 11 x, -5 x y - 19, 2 -11 x z - 7 y, -20 x - x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 1, 2, 5/6, 2/3, 2/3, 1/2, 5/12, 5/12, 7, 13, 13, 2, 2, 1, 2, 1, 3/7, 3/7, 5/7, 3/14, 3/14, 0, -1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1125.0MB, alloc=492.3MB, time=35.17 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318541 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [10 y z - 14, -11 x - z, -2 x - 9 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [2 x - 9 z , 2 x - 20 y z, 9 x y + 18 x] > Problem := [F,G]; 2 Problem := [[10 y z - 14, -11 x - z, -2 x - 9 x y], 2 2 2 [2 x - 9 z , 2 x - 20 y z, 9 x y + 18 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.50 memory used=47.6MB, alloc=32.3MB, time=0.83 memory used=68.3MB, alloc=32.3MB, time=1.14 memory used=87.9MB, alloc=56.3MB, time=1.49 memory used=130.8MB, alloc=60.3MB, time=2.31 memory used=168.8MB, alloc=84.3MB, time=3.02 memory used=226.7MB, alloc=108.3MB, time=4.14 memory used=304.6MB, alloc=116.3MB, time=5.55 memory used=374.0MB, alloc=140.3MB, time=6.87 memory used=458.9MB, alloc=164.3MB, time=8.57 memory used=552.7MB, alloc=188.3MB, time=11.29 memory used=658.4MB, alloc=212.3MB, time=14.75 memory used=775.4MB, alloc=236.3MB, time=19.48 memory used=915.3MB, alloc=236.3MB, time=25.17 memory used=1055.1MB, alloc=260.3MB, time=30.88 memory used=1218.9MB, alloc=260.3MB, time=37.50 memory used=1382.7MB, alloc=260.3MB, time=44.16 memory used=1546.4MB, alloc=284.3MB, time=50.93 memory used=1734.3MB, alloc=308.3MB, time=58.94 N1 := 6473 > GB := Basis(F, plex(op(vars))); 2 GB := [110 x - 63, 9 y + 2 x, z + 11 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1881.5MB, alloc=308.3MB, time=62.88 N2 := 1469 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [10 y z - 14, -11 x - z, -2 x - 9 x y, -9 z + 2 x , 2 x - 20 y z, 9 x y + 18 x] > J:=[op(GB),op(G)]; J := [ 2 2 2 2 110 x - 63, 9 y + 2 x, z + 11 x, -9 z + 2 x , 2 x - 20 y z, 9 x y + 18 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 1, 2, 5/6, 2/3, 2/3, 7/12, 1/3, 1/3, 6, 12, 10, 2, 2, 1, 2, 1, 1/2, 1/2, 7/12, 1/4, 1/4, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1985.0MB, alloc=564.3MB, time=66.28 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318615 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [15 y - 7 x, 15 x y + 5 y , -11 y z - 12] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-3 x y - 19 z , -2 x + 17 y z, 3 + 16 z] > Problem := [F,G]; 2 2 Problem := [[15 y - 7 x, 15 x y + 5 y , -11 y z - 12], 2 2 [-3 x y - 19 z , -2 x + 17 y z, 3 + 16 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.80 memory used=68.4MB, alloc=32.3MB, time=1.11 memory used=88.3MB, alloc=56.3MB, time=1.42 memory used=127.9MB, alloc=60.3MB, time=2.04 memory used=164.3MB, alloc=84.3MB, time=2.67 memory used=213.2MB, alloc=84.3MB, time=3.55 memory used=267.8MB, alloc=108.3MB, time=4.66 memory used=341.6MB, alloc=140.3MB, time=6.00 memory used=432.3MB, alloc=164.3MB, time=7.81 memory used=536.4MB, alloc=444.3MB, time=9.76 memory used=648.4MB, alloc=468.3MB, time=12.95 memory used=770.4MB, alloc=492.3MB, time=17.12 memory used=902.6MB, alloc=516.3MB, time=22.62 memory used=1058.9MB, alloc=540.3MB, time=28.98 memory used=1239.0MB, alloc=540.3MB, time=36.31 memory used=1419.3MB, alloc=540.3MB, time=43.84 memory used=1599.4MB, alloc=564.3MB, time=51.77 memory used=1803.8MB, alloc=588.3MB, time=59.85 N1 := 6285 > GB := Basis(F, plex(op(vars))); GB := [135 x - 7, 45 y + 7, 77 z - 540] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2029.8MB, alloc=588.3MB, time=64.48 memory used=2281.2MB, alloc=612.3MB, time=74.24 N2 := 3303 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [15 y - 7 x, 15 x y + 5 y , -11 y z - 12, -3 x y - 19 z , -2 x + 17 y z, 16 z + 3] > J:=[op(GB),op(G)]; J := 2 2 [135 x - 7, 45 y + 7, 77 z - 540, -3 x y - 19 z , -2 x + 17 y z, 16 z + 3] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 2/3, 5/6, 2/3, 1/3, 1/2, 1/3, 6, 10, 8, 2, 2, 1, 2, 1/2, 1/2, 2/3, 1/4, 1/4, 1/3, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2454.8MB, alloc=612.3MB, time=81.94 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318711 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 z , -5 x y - 17 x z, -15 + 13 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [6 x - 15 y, -20 x y - 15 z, -7 x - 14 y] > Problem := [F,G]; 2 Problem := [[-12 z , -5 x y - 17 x z, -15 + 13 x], 2 [6 x - 15 y, -20 x y - 15 z, -7 x - 14 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.19 memory used=26.6MB, alloc=32.3MB, time=0.57 N1 := 347 > GB := Basis(F, plex(op(vars))); 2 GB := [13 x - 15, y , 17 z + 5 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.0MB, alloc=32.3MB, time=1.02 memory used=67.1MB, alloc=56.3MB, time=1.38 N2 := 255 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-12 z , -5 x y - 17 x z, 13 x - 15, 6 x - 15 y, -20 x y - 15 z, -7 x - 14 y] > J:=[op(GB),op(G)]; 2 2 J := [13 x - 15, y , 17 z + 5 y, 6 x - 15 y, -20 x y - 15 z, -7 x - 14 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 2, 1, 2, 5/6, 2/3, 1/2, 1/2, 1/3, 1/4, 6, 11, 9, 2, 2, 2, 1, 2/3, 5/6, 1/3, 1/3, 5/12, 1/6, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=74.5MB, alloc=56.3MB, time=1.54 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318713 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [7 x y + z, -x + 15, 2 z - 9] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-19 y z + 7 x, -2 y - 7 y z, -z - 18] > Problem := [F,G]; Problem := 2 2 2 2 [[7 x y + z, -x + 15, 2 z - 9], [-19 y z + 7 x, -2 y - 7 y z, -z - 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.53 memory used=47.2MB, alloc=32.3MB, time=0.90 memory used=66.8MB, alloc=32.3MB, time=1.24 memory used=85.6MB, alloc=56.3MB, time=1.59 memory used=123.0MB, alloc=60.3MB, time=2.26 memory used=160.1MB, alloc=84.3MB, time=3.05 memory used=216.9MB, alloc=108.3MB, time=4.30 memory used=292.0MB, alloc=140.3MB, time=5.96 memory used=383.6MB, alloc=140.3MB, time=7.85 memory used=463.3MB, alloc=164.3MB, time=10.09 memory used=552.7MB, alloc=188.3MB, time=13.05 memory used=654.0MB, alloc=212.3MB, time=17.14 memory used=779.4MB, alloc=212.3MB, time=22.29 memory used=904.8MB, alloc=236.3MB, time=27.31 memory used=1054.2MB, alloc=236.3MB, time=33.51 N1 := 4763 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x - 15, 490 y - 3, 7 y x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1205.3MB, alloc=236.3MB, time=38.50 N2 := 1247 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [7 y x + z, -x + 15, 2 z - 9, -19 z y + 7 x, -2 y - 7 y z, -z - 18] > J:=[op(GB),op(G)]; 2 2 2 2 J := [x - 15, 490 y - 3, 7 y x + z, -19 z y + 7 x, -2 y - 7 y z, -z - 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 1/2, 1/2, 5/6, 1/4, 1/3, 5/12, 6, 11, 12, 2, 2, 2, 2, 1/2, 2/3, 2/3, 1/4, 5/12, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1359.8MB, alloc=236.3MB, time=43.10 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318771 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-16 y + 13, 10 y z + 6, 9 x - 11 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-2 x - 6 y, 3 z + 8 y, -14 y z + 2 x] > Problem := [F,G]; 2 2 Problem := [[-16 y + 13, 10 y z + 6, 9 x - 11 x y], 2 2 [-2 x - 6 y, 3 z + 8 y, -14 y z + 2 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.2MB, alloc=32.3MB, time=0.54 memory used=47.9MB, alloc=32.3MB, time=0.88 memory used=68.4MB, alloc=32.3MB, time=1.22 memory used=89.0MB, alloc=56.3MB, time=1.63 memory used=131.2MB, alloc=60.3MB, time=2.49 memory used=168.9MB, alloc=84.3MB, time=3.26 memory used=226.3MB, alloc=84.3MB, time=4.42 memory used=278.4MB, alloc=108.3MB, time=5.57 memory used=346.4MB, alloc=132.3MB, time=7.61 memory used=427.6MB, alloc=156.3MB, time=10.82 memory used=529.4MB, alloc=156.3MB, time=14.93 memory used=631.1MB, alloc=180.3MB, time=19.02 N1 := 3289 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [1296 x - 1573 x, -9 x + 11 x y, 16 y - 13, 65 z + 48 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=752.6MB, alloc=188.3MB, time=21.70 memory used=867.2MB, alloc=468.3MB, time=23.94 memory used=1019.1MB, alloc=492.3MB, time=26.91 memory used=1179.8MB, alloc=516.3MB, time=32.10 memory used=1339.1MB, alloc=540.3MB, time=39.21 memory used=1520.4MB, alloc=564.3MB, time=47.50 memory used=1726.1MB, alloc=588.3MB, time=56.23 N2 := 4509 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-16 y + 13, 10 y z + 6, 9 x - 11 x y, -2 x - 6 y, 3 z + 8 y, -14 y z + 2 x] > J:=[op(GB),op(G)]; 3 2 2 2 J := [1296 x - 1573 x, -9 x + 11 x y, 16 y - 13, 65 z + 48 y, -2 x - 6 y, 2 3 z + 8 y, -14 y z + 2 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 1, 1/2, 1/3, 1/2, 1/4, 7, 13, 14, 3, 3, 2, 2, 4/7, 6/7, 3/7, 3/7, 3/7, 3/14, -1, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1743.6MB, alloc=588.3MB, time=56.73 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428318844 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-19 x z - 17 x, -4 y z + 12 x, 8 y z + 18 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-11 x z + 9 y, 15 x z + 14 y , 13 x y + 15 x] > Problem := [F,G]; Problem := [[-19 x z - 17 x, -4 y z + 12 x, 8 y z + 18 y], 2 [-11 x z + 9 y, 15 x z + 14 y , 13 x y + 15 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.50 memory used=47.3MB, alloc=32.3MB, time=0.79 memory used=66.8MB, alloc=56.3MB, time=1.11 memory used=104.5MB, alloc=60.3MB, time=1.68 memory used=139.8MB, alloc=84.3MB, time=2.22 memory used=195.1MB, alloc=84.3MB, time=3.09 memory used=248.1MB, alloc=108.3MB, time=3.97 memory used=325.6MB, alloc=140.3MB, time=5.50 memory used=413.6MB, alloc=164.3MB, time=7.14 memory used=516.7MB, alloc=188.3MB, time=9.13 memory used=633.5MB, alloc=212.3MB, time=11.38 memory used=755.2MB, alloc=492.3MB, time=13.74 memory used=896.6MB, alloc=516.3MB, time=16.42 memory used=1046.5MB, alloc=540.3MB, time=20.38 memory used=1193.7MB, alloc=564.3MB, time=25.45 memory used=1352.2MB, alloc=588.3MB, time=31.34 memory used=1524.0MB, alloc=612.3MB, time=38.04 memory used=1710.3MB, alloc=636.3MB, time=45.62 memory used=1908.8MB, alloc=660.3MB, time=54.46 memory used=2131.2MB, alloc=684.3MB, time=64.33 memory used=2377.5MB, alloc=708.3MB, time=74.75 memory used=2647.7MB, alloc=732.3MB, time=86.07 memory used=2942.0MB, alloc=732.3MB, time=99.06 memory used=3236.1MB, alloc=732.3MB, time=111.87 memory used=3530.3MB, alloc=756.3MB, time=125.01 memory used=3848.2MB, alloc=756.3MB, time=139.14 memory used=4166.1MB, alloc=756.3MB, time=152.78 memory used=4483.8MB, alloc=780.3MB, time=166.41 memory used=4825.7MB, alloc=780.3MB, time=180.96 memory used=5167.4MB, alloc=804.3MB, time=195.54 memory used=5533.2MB, alloc=804.3MB, time=210.79 memory used=5898.7MB, alloc=828.3MB, time=226.10 memory used=6288.3MB, alloc=852.3MB, time=243.20 N1 := 13287 > GB := Basis(F, plex(op(vars))); GB := [x, y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 67 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [-19 x z - 17 x, -4 y z + 12 x, 8 y z + 18 y, -11 x z + 9 y, 2 15 z x + 14 y , 13 x y + 15 x] > J:=[op(GB),op(G)]; 2 J := [x, y, -11 x z + 9 y, 15 z x + 14 y , 13 x y + 15 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 1, 2, 1, 5/6, 5/6, 5/6, 7/12, 1/2, 5/12, 5, 10, 8, 2, 1, 2, 1, 4/5, 4/5, 2/5, 5/8, 1/2, 1/4, 5, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=6428.2MB, alloc=852.3MB, time=248.97 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319138 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-18 x + 3 y z, -8 - 17 y, -15 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [10 + 10 x, -10 y - 2 z, 4 y + 15 z] > Problem := [F,G]; Problem := 2 2 [[-18 x + 3 y z, -8 - 17 y, -15 x], [10 + 10 x, -10 y - 2 z, 4 y + 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.22 N1 := 455 > GB := Basis(F, plex(op(vars))); GB := [x, 17 y + 8, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=86.3MB, alloc=100.3MB, time=1.81 N2 := 215 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-18 x + 3 y z, -8 - 17 y, -15 x, 10 + 10 x, -10 y - 2 z, 4 y + 15 z] > J:=[op(GB),op(G)]; 2 J := [x, 17 y + 8, z, 10 + 10 x, -10 y - 2 z, 4 y + 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 8, 2, 2, 2, 1, 1/2, 2/3, 1/2, 1/4, 1/3, 1/4, 6, 8, 7, 2, 1, 2, 1, 1/3, 1/2, 1/2, 1/5, 3/10, 3/10, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=87.3MB, alloc=100.3MB, time=1.84 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319140 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [9 - 13 z, -12 z + 4 x, 5 y + 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [x - 4 x, -4 y z - 10 z, 4 y - 10 z ] > Problem := [F,G]; 2 2 Problem := [[9 - 13 z, -12 z + 4 x, 5 y + 20 z], 2 2 2 [x - 4 x, -4 y z - 10 z, 4 y - 10 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.1MB, alloc=32.3MB, time=0.54 memory used=47.0MB, alloc=32.3MB, time=0.89 memory used=67.0MB, alloc=32.3MB, time=1.18 memory used=87.7MB, alloc=56.3MB, time=1.61 memory used=129.3MB, alloc=56.3MB, time=2.44 memory used=165.1MB, alloc=80.3MB, time=3.16 memory used=205.5MB, alloc=108.3MB, time=3.98 memory used=273.8MB, alloc=132.3MB, time=5.62 memory used=351.7MB, alloc=156.3MB, time=8.34 memory used=448.2MB, alloc=156.3MB, time=12.14 memory used=544.5MB, alloc=156.3MB, time=15.93 memory used=640.9MB, alloc=180.3MB, time=19.58 N1 := 3947 > GB := Basis(F, plex(op(vars))); 2 GB := [169 x - 243, 13 y + 36, 13 z - 9] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=764.8MB, alloc=188.3MB, time=23.31 N2 := 511 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 9 - 13 z, -12 z + 4 x, 5 y + 20 z, x - 4 x, -4 y z - 10 z, 4 y - 10 z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [169 x - 243, 13 y + 36, 13 z - 9, x - 4 x, -4 y z - 10 z, 4 y - 10 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 1/3, 1/2, 5/6, 1/4, 1/4, 1/2, 6, 8, 10, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/4, 1/4, 1/3, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=776.7MB, alloc=188.3MB, time=23.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319170 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-20 y z + 3 z, 7 x y + 19 y , 15 x z - 13 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-16 x + 14 x, 6 x y + 5 x z, -17 x + 18] > Problem := [F,G]; 2 Problem := [[-20 y z + 3 z, 7 x y + 19 y , 15 x z - 13 z], 2 2 [-16 x + 14 x, 6 x y + 5 x z, -17 x + 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.1MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=56.3MB, time=0.89 N1 := 409 > GB := Basis(F, plex(op(vars))); 2 GB := [7 x y + 19 y , z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 197 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-20 y z + 3 z, 7 x y + 19 y , 15 x z - 13 z, -16 x + 14 x, 6 x y + 5 x z, 2 -17 x + 18] > J:=[op(GB),op(G)]; 2 2 2 J := [7 x y + 19 y , z, -16 x + 14 x, 6 x y + 5 x z, -17 x + 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 1, 5/6, 1/2, 1/2, 7/12, 1/3, 5/12, 5, 8, 9, 2, 2, 2, 1, 4/5, 2/5, 2/5, 2/3, 1/3, 2/9, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=73.1MB, alloc=56.3MB, time=1.33 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319172 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [12 x y + 18 z, 18 x z - 14 y , -17 x y - 13 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [7 x - 17 x y, 3 x z + 11 y , -13 z + 20 z] > Problem := [F,G]; 2 Problem := [[12 x y + 18 z, 18 x z - 14 y , -17 x y - 13 y], 2 2 2 [7 x - 17 x y, 3 x z + 11 y , -13 z + 20 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.8MB, alloc=32.3MB, time=0.85 memory used=68.2MB, alloc=32.3MB, time=1.15 memory used=87.7MB, alloc=56.3MB, time=1.47 memory used=129.7MB, alloc=60.3MB, time=2.18 memory used=167.4MB, alloc=84.3MB, time=2.87 memory used=221.0MB, alloc=84.3MB, time=3.86 memory used=272.3MB, alloc=108.3MB, time=4.95 memory used=336.3MB, alloc=132.3MB, time=7.02 memory used=416.6MB, alloc=156.3MB, time=10.09 N1 := 2779 > GB := Basis(F, plex(op(vars))); 2 GB := [17 x y + 13 y, 2023 y + 1014 y, 51 z - 26 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=522.1MB, alloc=156.3MB, time=13.74 memory used=574.4MB, alloc=164.3MB, time=14.60 memory used=695.2MB, alloc=188.3MB, time=17.43 N2 := 1729 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [12 x y + 18 z, 18 x z - 14 y , -17 x y - 13 y, 7 x - 17 x y, 2 2 3 z x + 11 y , -13 z + 20 z] > J:=[op(GB),op(G)]; 2 2 J := [17 x y + 13 y, 2023 y + 1014 y, 51 z - 26 y, 7 x - 17 x y, 2 2 3 z x + 11 y , -13 z + 20 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 5/6, 2/3, 1/2, 1/2, 5/12, 6, 11, 11, 2, 2, 2, 2, 1/2, 5/6, 1/2, 1/3, 7/12, 1/3, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=763.5MB, alloc=188.3MB, time=19.75 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319193 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [19 y + 12 y, 15 y - 3 z , -9 x y + 19 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-7 x y + 11 y , -5 + 4 x, 14 x y + 8] > Problem := [F,G]; 2 2 2 Problem := [[19 y + 12 y, 15 y - 3 z , -9 x y + 19 x z], 2 [-7 x y + 11 y , -5 + 4 x, 14 x y + 8]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.6MB, alloc=32.3MB, time=0.52 memory used=49.1MB, alloc=56.3MB, time=0.92 N1 := 475 > GB := Basis(F, plex(op(vars))); 2 2 GB := [y x, 19 y + 12 y, x z, 19 z + 60 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=89.6MB, alloc=60.3MB, time=1.63 N2 := 375 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [19 y + 12 y, 15 y - 3 z , -9 x y + 19 x z, -7 x y + 11 y , 4 x - 5, 14 x y + 8] > J:=[op(GB),op(G)]; J := 2 2 2 [y x, 19 y + 12 y, x z, 19 z + 60 y, -7 x y + 11 y , 4 x - 5, 14 x y + 8] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 2/3, 5/6, 1/3, 5/12, 7/12, 1/6, 7, 12, 13, 2, 1, 2, 2, 5/7, 5/7, 2/7, 5/14, 1/2, 1/7, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=109.5MB, alloc=60.3MB, time=1.97 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319196 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [9 x - 20 z, -3 x y, 5 x z - 7 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-5 x y - x, -20 - 6 z, 8 y z - 8 z ] > Problem := [F,G]; Problem := 2 2 [[9 x - 20 z, -3 x y, 5 x z - 7 x], [-5 x y - x, -20 - 6 z, 8 y z - 8 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=48.8MB, alloc=32.3MB, time=0.88 memory used=67.5MB, alloc=56.3MB, time=1.29 N1 := 677 > GB := Basis(F, plex(op(vars))); 3 2 GB := [9 x - 28 x, x y, -9 x + 20 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=104.8MB, alloc=60.3MB, time=1.93 N2 := 495 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [9 x - 20 z, -3 x y, 5 x z - 7 x, -5 x y - x, -20 - 6 z, 8 y z - 8 z ] > J:=[op(GB),op(G)]; 3 2 2 J := [9 x - 28 x, x y, -9 x + 20 z, -5 x y - x, -20 - 6 z, 8 y z - 8 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 2/3, 1/2, 2/3, 6/13, 3/13, 5/13, 6, 10, 12, 3, 3, 1, 2, 2/3, 1/2, 1/2, 1/2, 1/4, 1/3, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=130.4MB, alloc=60.3MB, time=2.41 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319198 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [11 y - 10 x, -11 x y - 14 y z, -20 x z - 17 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [9 x + 2 y , 9 z + 20, 16 x - 7] > Problem := [F,G]; 2 Problem := [[11 y - 10 x, -11 x y - 14 y z, -20 x z - 17 x], 2 2 2 2 [9 x + 2 y , 9 z + 20, 16 x - 7]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.50 N1 := 251 > GB := Basis(F, plex(op(vars))); 2 2 GB := [110 x - 119 x, 11 y - 10 x, 20 x z + 17 x, 11 x y + 14 y z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.1MB, alloc=32.3MB, time=0.88 memory used=67.6MB, alloc=32.3MB, time=1.17 N2 := 251 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [11 y - 10 x, -11 x y - 14 y z, -20 x z - 17 x, 2 y + 9 x , 9 z + 20, 2 16 x - 7] > J:=[op(GB),op(G)]; 2 2 2 2 J := [110 x - 119 x, 11 y - 10 x, 20 x z + 17 x, 11 x y + 14 y z, 2 y + 9 x , 2 2 9 z + 20, 16 x - 7] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 5/6, 1/2, 1/2, 1/2, 1/3, 1/4, 7, 12, 14, 2, 2, 2, 2, 6/7, 3/7, 3/7, 4/7, 2/7, 3/14, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=85.3MB, alloc=32.3MB, time=1.51 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319200 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [7 y z - 4 z , -6 z + 8 y, 8 x - 3 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [2 x y - z , x z - 11, -10 x z - 8 y] > Problem := [F,G]; 2 2 2 Problem := [[7 y z - 4 z , -6 z + 8 y, 8 x - 3 x z], 2 [2 x y - z , x z - 11, -10 x z - 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=31.7MB, alloc=40.3MB, time=0.60 memory used=59.6MB, alloc=40.3MB, time=1.01 memory used=85.1MB, alloc=64.3MB, time=1.40 memory used=129.6MB, alloc=68.3MB, time=2.09 memory used=170.9MB, alloc=92.3MB, time=2.73 memory used=231.0MB, alloc=100.3MB, time=3.66 memory used=289.5MB, alloc=124.3MB, time=4.57 memory used=370.0MB, alloc=124.3MB, time=5.83 memory used=449.3MB, alloc=148.3MB, time=7.10 memory used=548.7MB, alloc=148.3MB, time=8.69 memory used=643.7MB, alloc=172.3MB, time=10.22 memory used=755.1MB, alloc=196.3MB, time=12.07 memory used=854.8MB, alloc=476.3MB, time=13.82 memory used=1006.4MB, alloc=500.3MB, time=16.68 memory used=1163.3MB, alloc=524.3MB, time=19.73 memory used=1328.7MB, alloc=548.3MB, time=22.91 memory used=1502.8MB, alloc=572.3MB, time=26.32 memory used=1687.7MB, alloc=596.3MB, time=29.86 memory used=1877.9MB, alloc=620.3MB, time=33.57 memory used=2074.3MB, alloc=644.3MB, time=37.47 memory used=2275.6MB, alloc=668.3MB, time=41.53 memory used=2482.2MB, alloc=692.3MB, time=45.71 memory used=2678.5MB, alloc=716.3MB, time=51.65 memory used=2866.5MB, alloc=740.3MB, time=58.44 memory used=3062.5MB, alloc=764.3MB, time=65.89 memory used=3270.4MB, alloc=788.3MB, time=74.07 memory used=3490.8MB, alloc=812.3MB, time=82.80 memory used=3722.3MB, alloc=836.3MB, time=92.22 memory used=3966.9MB, alloc=860.3MB, time=102.31 memory used=4224.7MB, alloc=884.3MB, time=113.34 memory used=4496.1MB, alloc=908.3MB, time=124.97 memory used=4781.7MB, alloc=932.3MB, time=137.63 memory used=5081.5MB, alloc=956.3MB, time=150.86 memory used=5390.9MB, alloc=980.3MB, time=164.92 memory used=5719.5MB, alloc=1004.3MB, time=180.01 memory used=6072.1MB, alloc=1028.3MB, time=196.15 memory used=6448.7MB, alloc=1052.3MB, time=213.37 memory used=6849.1MB, alloc=1076.3MB, time=231.64 memory used=7273.5MB, alloc=1100.3MB, time=250.76 memory used=7721.9MB, alloc=1124.3MB, time=271.12 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319500 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 x y - 19 y, 6 x y - 2 x, 9 y - 11 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [7 x z - 17 y z, -3 z + 15, x z + 6 x] > Problem := [F,G]; 2 Problem := [[-8 x y - 19 y, 6 x y - 2 x, 9 y - 11 y z], 2 [7 x z - 17 y z, -3 z + 15, x z + 6 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.47 memory used=48.2MB, alloc=32.3MB, time=0.85 memory used=68.2MB, alloc=56.3MB, time=1.22 memory used=107.4MB, alloc=80.3MB, time=1.96 memory used=161.7MB, alloc=80.3MB, time=3.71 N1 := 1645 > GB := Basis(F, plex(op(vars))); 2 GB := [8 x + 19 x, 8 x + 57 y, 11 x z - 3 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=214.4MB, alloc=80.3MB, time=5.12 N2 := 253 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-8 x y - 19 y, 6 x y - 2 x, 9 y - 11 y z, 7 x z - 17 y z, -3 z + 15, x z + 6 x] > J:=[op(GB),op(G)]; 2 2 J := [8 x + 19 x, 57 y + 8 x, 11 x z - 3 x, 7 x z - 17 y z, -3 z + 15, x z + 6 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 1, 2, 2, 2/3, 2/3, 2/3, 1/2, 1/2, 5/12, 6, 11, 11, 2, 2, 1, 2, 5/6, 1/3, 2/3, 2/3, 1/6, 5/12, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=222.3MB, alloc=80.3MB, time=5.27 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319507 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 F := [-5 x - 12 z , 8 x y - 10 z , -4 x z - 20 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-13 x - 12 y, -8 x y - 19 y , 19 x + 8] > Problem := [F,G]; 2 2 2 2 Problem := [[-5 x - 12 z , 8 x y - 10 z , -4 x z - 20 z ], 2 2 [-13 x - 12 y, -8 x y - 19 y , 19 x + 8]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.51 N1 := 139 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [x , 25 x + 48 x y, -25 x + 12 x z, 12 z + 5 x ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.8MB, alloc=32.3MB, time=0.87 N2 := 63 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-5 x - 12 z , 8 x y - 10 z , -4 x z - 20 z , -13 x - 12 y, 2 2 -8 x y - 19 y , 19 x + 8] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [x , 25 x + 48 x y, -25 x + 12 x z, 12 z + 5 x , -13 x - 12 y, 2 2 -8 x y - 19 y , 19 x + 8] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 1, 1/2, 1/2, 1/2, 1/3, 1/3, 7, 12, 14, 3, 3, 2, 2, 1, 3/7, 2/7, 9/14, 2/7, 1/7, 0, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=53.2MB, alloc=32.3MB, time=0.96 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319508 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-2 z + 18, 7 x + 20 x z, -5 x z + 9 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-10 x - 18 y, y - 12 x, 8 y + 12 z] > Problem := [F,G]; 2 2 2 Problem := [[-2 z + 18, 7 x + 20 x z, -5 x z + 9 z ], 2 2 2 [-10 x - 18 y, y - 12 x, 8 y + 12 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=47.7MB, alloc=32.3MB, time=0.79 memory used=68.0MB, alloc=32.3MB, time=1.09 memory used=86.7MB, alloc=56.3MB, time=1.38 memory used=127.9MB, alloc=60.3MB, time=2.10 memory used=165.3MB, alloc=84.3MB, time=2.79 memory used=221.2MB, alloc=108.3MB, time=3.81 memory used=291.4MB, alloc=132.3MB, time=5.24 memory used=371.6MB, alloc=156.3MB, time=7.48 memory used=462.0MB, alloc=180.3MB, time=10.94 memory used=576.5MB, alloc=180.3MB, time=15.29 memory used=690.9MB, alloc=180.3MB, time=19.58 memory used=805.3MB, alloc=204.3MB, time=23.80 N1 := 4167 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 75 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-2 z + 18, 7 x + 20 x z, -5 x z + 9 z , -10 x - 18 y, y - 12 x, 2 8 y + 12 z] > J:=[op(GB),op(G)]; 2 2 2 J := [1, -10 x - 18 y, y - 12 x, 8 y + 12 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 1/2, 2/3, 5/12, 1/4, 5/12, 4, 6, 6, 2, 2, 2, 1, 1/2, 3/4, 1/4, 2/7, 3/7, 1/7, 5, 6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=847.0MB, alloc=204.3MB, time=24.93 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319539 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [10 + 20 z, -9 x + 16 x, -3 z - 10 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [16 x y + 16, 10 z - 2 z, -4 x y - 7] > Problem := [F,G]; 2 2 Problem := [[10 + 20 z, -9 x + 16 x, -3 z - 10 y], 2 [16 x y + 16, 10 z - 2 z, -4 x y - 7]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=48.6MB, alloc=32.3MB, time=0.87 memory used=68.6MB, alloc=56.3MB, time=1.24 memory used=107.8MB, alloc=84.3MB, time=2.09 N1 := 1269 > GB := Basis(F, plex(op(vars))); 2 GB := [9 x - 16 x, 40 y + 3, 2 z + 1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=162.0MB, alloc=84.3MB, time=3.53 N2 := 385 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 10 + 20 z, -9 x + 16 x, -3 z - 10 y, 16 x y + 16, 10 z - 2 z, -4 x y - 7 ] > J:=[op(GB),op(G)]; 2 2 J := [9 x - 16 x, 40 y + 3, 2 z + 1, 16 x y + 16, 10 z - 2 z, -4 x y - 7] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 1, 2, 1/2, 1/2, 1/2, 1/3, 1/4, 1/3, 6, 8, 10, 2, 2, 1, 2, 1/2, 1/2, 1/3, 1/3, 1/4, 1/4, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=191.3MB, alloc=84.3MB, time=4.03 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319543 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-13 y - 7 x, -12 x y + 16 z , -20 x - 6 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-17 x + 3 z, 10 y - 20 y, 19 y + 7 z] > Problem := [F,G]; 2 2 2 Problem := [[-13 y - 7 x, -12 x y + 16 z , -20 x - 6 x], 2 [-17 x + 3 z, 10 y - 20 y, 19 y + 7 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.46 memory used=47.5MB, alloc=32.3MB, time=0.76 memory used=69.1MB, alloc=56.3MB, time=1.16 memory used=112.2MB, alloc=60.3MB, time=1.93 memory used=150.7MB, alloc=84.3MB, time=2.65 memory used=205.2MB, alloc=108.3MB, time=4.31 N1 := 1567 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [10 x + 3 x, 13 y + 7 x, -3 x y + 4 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=279.1MB, alloc=108.3MB, time=6.05 memory used=360.1MB, alloc=116.3MB, time=7.45 memory used=436.1MB, alloc=140.3MB, time=9.40 N2 := 1567 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-13 y - 7 x, -12 x y + 16 z , -20 x - 6 x, -17 x + 3 z, 10 y - 20 y, 7 z + 19 y] > J:=[op(GB),op(G)]; 2 2 2 2 J := [10 x + 3 x, 13 y + 7 x, -3 x y + 4 z , -17 x + 3 z, 10 y - 20 y, 7 z + 19 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 10, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/4, 6, 11, 10, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/4, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=485.8MB, alloc=140.3MB, time=11.03 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319555 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [2 x z + 13 y , 9 x y - 11 x z, -19 x z - 20 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-13 y + 9 x, -16 z + x, 9 z - 5] > Problem := [F,G]; 2 Problem := [[2 x z + 13 y , 9 x y - 11 x z, -19 x z - 20 y z], 2 2 2 [-13 y + 9 x, -16 z + x, 9 z - 5]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.50 memory used=47.7MB, alloc=32.3MB, time=0.82 memory used=67.5MB, alloc=32.3MB, time=1.11 memory used=86.5MB, alloc=56.3MB, time=1.43 memory used=125.4MB, alloc=60.3MB, time=2.02 memory used=161.5MB, alloc=84.3MB, time=2.60 memory used=222.3MB, alloc=108.3MB, time=3.71 memory used=300.4MB, alloc=140.3MB, time=5.09 memory used=393.5MB, alloc=164.3MB, time=6.73 memory used=500.8MB, alloc=188.3MB, time=8.64 memory used=616.5MB, alloc=212.3MB, time=10.90 memory used=733.9MB, alloc=236.3MB, time=14.26 memory used=859.0MB, alloc=260.3MB, time=18.28 memory used=994.8MB, alloc=284.3MB, time=23.11 memory used=1144.9MB, alloc=308.3MB, time=29.03 memory used=1319.1MB, alloc=332.3MB, time=35.94 memory used=1517.2MB, alloc=332.3MB, time=43.73 memory used=1715.2MB, alloc=356.3MB, time=51.55 memory used=1937.3MB, alloc=356.3MB, time=60.35 memory used=2159.2MB, alloc=356.3MB, time=69.43 memory used=2381.1MB, alloc=380.3MB, time=78.54 memory used=2627.1MB, alloc=380.3MB, time=88.62 memory used=2872.9MB, alloc=380.3MB, time=98.70 memory used=3118.6MB, alloc=404.3MB, time=108.99 memory used=3388.1MB, alloc=428.3MB, time=120.34 N1 := 9857 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x y, 18 x y + 143 y , -9 x y + 11 x z, 171 x y + 220 y z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=3605.3MB, alloc=428.3MB, time=127.89 memory used=3956.2MB, alloc=708.3MB, time=137.81 memory used=4272.0MB, alloc=732.3MB, time=151.92 N2 := 4119 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [2 z x + 13 y , 9 x y - 11 x z, -19 x z - 20 y z, -13 y + 9 x, -16 z + x, 2 9 z - 5] > J:=[op(GB),op(G)]; 2 2 2 J := [x y, 18 x y + 143 y , -9 x y + 11 x z, 171 x y + 220 y z, -13 y + 9 x, 2 2 -16 z + x, 9 z - 5] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 1, 2, 2, 5/6, 2/3, 5/6, 1/2, 1/3, 1/2, 7, 15, 15, 3, 2, 2, 2, 6/7, 5/7, 4/7, 1/2, 1/2, 2/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=4352.1MB, alloc=732.3MB, time=155.26 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319746 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-20 x - 5 x z, -20 x + 19 y , x z - 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [13 x y - 12 x, 18 x y + 13 x z, 8 x z + 18] > Problem := [F,G]; 2 2 2 Problem := [[-20 x - 5 x z, -20 x + 19 y , x z - 2 z], [13 x y - 12 x, 18 x y + 13 x z, 8 x z + 18]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.51 memory used=47.5MB, alloc=32.3MB, time=0.84 memory used=68.3MB, alloc=56.3MB, time=1.26 memory used=109.5MB, alloc=60.3MB, time=2.14 memory used=145.7MB, alloc=84.3MB, time=2.83 memory used=199.7MB, alloc=108.3MB, time=4.38 memory used=269.4MB, alloc=108.3MB, time=7.08 N1 := 2059 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [x - 2 x , -20 x + 19 y , 2 x + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=339.5MB, alloc=108.3MB, time=8.83 memory used=414.1MB, alloc=140.3MB, time=10.36 memory used=510.6MB, alloc=164.3MB, time=13.90 N2 := 1619 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-20 x - 5 x z, -20 x + 19 y , x z - 2 z, 13 x y - 12 x, 18 x y + 13 x z, 8 x z + 18] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [x - 2 x , -20 x + 19 y , 2 x + z, 13 x y - 12 x, 18 x y + 13 x z, 8 x z + 18] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 1, 1, 1/2, 2/3, 3/4, 1/4, 5/12, 6, 12, 13, 3, 3, 2, 1, 1, 1/2, 1/2, 3/4, 1/4, 1/4, 1, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=531.1MB, alloc=164.3MB, time=14.60 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319764 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [14 x z - 20 z, 4 x + 19 x y, -18 x z - 9 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-3 x + 8 y, 5 z + 14 z, -3 y - z] > Problem := [F,G]; 2 Problem := [[14 x z - 20 z, 4 x + 19 x y, -18 x z - 9 y], 2 2 2 [-3 x + 8 y, 5 z + 14 z, -3 y - z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.4MB, alloc=32.3MB, time=0.80 memory used=68.1MB, alloc=56.3MB, time=1.14 memory used=110.9MB, alloc=60.3MB, time=1.92 memory used=148.5MB, alloc=84.3MB, time=2.62 memory used=204.6MB, alloc=108.3MB, time=3.77 memory used=273.7MB, alloc=132.3MB, time=6.14 memory used=359.3MB, alloc=132.3MB, time=9.55 N1 := 2555 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [7 x - 10 x , 14 x + 95 y, -49 x + 950 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=447.0MB, alloc=132.3MB, time=12.28 memory used=549.1MB, alloc=164.3MB, time=14.75 N2 := 1087 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [14 x z - 20 z, 4 x + 19 x y, -18 x z - 9 y, -3 x + 8 y, 5 z + 14 z, 2 -3 y - z] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [7 x - 10 x , 14 x + 95 y, -49 x + 950 z, -3 x + 8 y, 5 z + 14 z, 2 -3 y - z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 2/3, 2/3, 2/3, 5/12, 1/3, 1/2, 6, 10, 13, 3, 3, 2, 2, 2/3, 1/2, 1/2, 5/12, 1/4, 1/3, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=557.4MB, alloc=164.3MB, time=15.00 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428319782 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 z + 12 x, -9 x + 16 z, -15 x z + 12 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 x z + 3 y, -17 x z + 15, 7 y - 7 z ] > Problem := [F,G]; 2 2 Problem := [[-18 z + 12 x, -9 x + 16 z, -15 x z + 12 y ], 2 2 [16 x z + 3 y, -17 x z + 15, 7 y - 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.47 memory used=47.5MB, alloc=32.3MB, time=0.78 memory used=67.2MB, alloc=32.3MB, time=1.08 memory used=86.1MB, alloc=56.3MB, time=1.37 memory used=123.9MB, alloc=60.3MB, time=1.96 memory used=159.7MB, alloc=84.3MB, time=2.56 memory used=214.4MB, alloc=84.3MB, time=3.46 memory used=267.4MB, alloc=108.3MB, time=4.38 memory used=340.1MB, alloc=116.3MB, time=5.53 memory used=411.5MB, alloc=116.3MB, time=6.68 memory used=481.3MB, alloc=140.3MB, time=7.84 memory used=573.2MB, alloc=140.3MB, time=9.46 memory used=662.6MB, alloc=164.3MB, time=10.93 memory used=769.0MB, alloc=188.3MB, time=12.69 memory used=869.6MB, alloc=444.3MB, time=14.43 memory used=995.0MB, alloc=468.3MB, time=16.86 memory used=1135.0MB, alloc=492.3MB, time=19.61 memory used=1281.1MB, alloc=516.3MB, time=22.45 memory used=1437.7MB, alloc=540.3MB, time=25.68 memory used=1606.0MB, alloc=564.3MB, time=29.04 memory used=1781.8MB, alloc=588.3MB, time=32.67 memory used=1964.2MB, alloc=612.3MB, time=36.35 memory used=2153.8MB, alloc=636.3MB, time=40.24 memory used=2350.0MB, alloc=660.3MB, time=44.42 memory used=2550.9MB, alloc=684.3MB, time=48.53 memory used=2759.3MB, alloc=708.3MB, time=52.82 memory used=2975.5MB, alloc=732.3MB, time=57.23 memory used=3198.0MB, alloc=756.3MB, time=61.85 memory used=3405.2MB, alloc=780.3MB, time=68.50 memory used=3606.5MB, alloc=804.3MB, time=76.13 memory used=3818.3MB, alloc=828.3MB, time=84.42 memory used=4038.8MB, alloc=852.3MB, time=93.48 memory used=4270.9MB, alloc=876.3MB, time=103.01 memory used=4514.4MB, alloc=900.3MB, time=113.31 memory used=4770.7MB, alloc=924.3MB, time=124.20 memory used=5040.2MB, alloc=948.3MB, time=136.05 memory used=5323.5MB, alloc=972.3MB, time=148.69 memory used=5620.5MB, alloc=996.3MB, time=162.10 memory used=5931.3MB, alloc=1020.3MB, time=175.80 memory used=6256.6MB, alloc=1044.3MB, time=190.23 memory used=6596.4MB, alloc=1068.3MB, time=205.24 memory used=6951.0MB, alloc=1092.3MB, time=221.14 memory used=7320.3MB, alloc=1116.3MB, time=238.23 memory used=7701.0MB, alloc=1140.3MB, time=256.77 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320082 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [20 y - 5, -17 x z + 14 z , 2 x y + 17 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-8 x - 16 x y, -x y + 11 y, -20 x z + 10 z] > Problem := [F,G]; 2 2 2 Problem := [[20 y - 5, -17 x z + 14 z , 2 x y + 17 z ], 2 [-8 x - 16 x y, -x y + 11 y, -20 x z + 10 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.52 memory used=47.7MB, alloc=32.3MB, time=0.89 memory used=69.3MB, alloc=56.3MB, time=1.34 memory used=110.1MB, alloc=84.3MB, time=2.25 N1 := 1083 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [24137569 x - 38416 x, 4913 x + 392 x y, 4 y - 1, -17 x + 14 x z, 2 2 -289 x + 196 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=165.7MB, alloc=84.3MB, time=3.62 memory used=223.5MB, alloc=108.3MB, time=4.62 N2 := 1043 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [20 y - 5, -17 x z + 14 z , 17 z + 2 y x, -8 x - 16 x y, -x y + 11 y, -20 x z + 10 z] > J:=[op(GB),op(G)]; 3 2 2 2 J := [24137569 x - 38416 x, 4913 x + 392 x y, 4 y - 1, -17 x + 14 x z, 2 2 2 -289 x + 196 z , -8 x - 16 x y, -x y + 11 y, -20 x z + 10 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 2/3, 1/2, 1/2, 5/12, 5/12, 8, 14, 17, 3, 3, 2, 2, 7/8, 1/2, 3/8, 11/16, 5/16, 1/4, -2, -5, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=275.3MB, alloc=108.3MB, time=6.24 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320091 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-6 x z - 4 y z, -10 y z - 7 z , 16 y + 5 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-4 y + 19 z , -14 + 13 y, 10 x y + 20 x z] > Problem := [F,G]; 2 Problem := [[-6 x z - 4 y z, -10 y z - 7 z , 16 y + 5 z], 2 2 [-4 y + 19 z , -14 + 13 y, 10 x y + 20 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.55 N1 := 353 > GB := Basis(F, plex(op(vars))); 2 GB := [y x, y , 5 z + 16 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.9MB, alloc=32.3MB, time=1.00 N2 := 117 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-6 x z - 4 y z, -10 y z - 7 z , 5 z + 16 y, -4 y + 19 z , 13 y - 14, 10 x y + 20 x z] > J:=[op(GB),op(G)]; 2 2 2 J := [y x, y , 5 z + 16 y, -4 y + 19 z , 13 y - 14, 10 x y + 20 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 10, 2, 1, 2, 2, 1/3, 1, 5/6, 1/4, 1/2, 7/12, 6, 11, 10, 2, 1, 2, 2, 1/3, 1, 1/2, 1/4, 1/2, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=60.9MB, alloc=32.3MB, time=1.21 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320094 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [13 x + 11 y, -8 x + 15, -8 x y + 4] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-20 x z + 17 y z, -12 x - 16 x z, 17 z + 14] > Problem := [F,G]; 2 Problem := [[13 x + 11 y, -8 x + 15, -8 x y + 4], 2 2 [-20 x z + 17 y z, -12 x - 16 x z, 17 z + 14]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.20 memory used=26.4MB, alloc=32.3MB, time=0.63 memory used=48.4MB, alloc=32.3MB, time=1.07 N1 := 339 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 39 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 H := [11 y + 13 x, -8 x + 15, -8 x y + 4, -20 x z + 17 y z, -12 x - 16 x z, 2 17 z + 14] > J:=[op(GB),op(G)]; 2 2 J := [1, -20 x z + 17 y z, -12 x - 16 x z, 17 z + 14] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 2, 5/6, 1/2, 1/2, 1/2, 1/4, 1/3, 4, 6, 6, 2, 2, 1, 2, 1/2, 1/4, 3/4, 3/7, 1/7, 4/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=59.2MB, alloc=32.3MB, time=1.28 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320096 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 y z - 4 z, 16 z + 5 x, 7 x z - 17] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [x z - 15, -7 z, -13 x z - 2 z ] > Problem := [F,G]; Problem := [ 2 2 [-11 y z - 4 z, 16 z + 5 x, 7 x z - 17], [x z - 15, -7 z, -13 x z - 2 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.9MB, alloc=32.3MB, time=0.55 N1 := 291 > GB := Basis(F, plex(op(vars))); 3 2 GB := [245 x + 4624, 11 y + 4, 35 x + 272 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.1MB, alloc=32.3MB, time=0.96 memory used=68.2MB, alloc=56.3MB, time=1.34 N2 := 213 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-11 y z - 4 z, 16 z + 5 x, 7 z x - 17, z x - 15, -7 z, -13 x z - 2 z ] > J:=[op(GB),op(G)]; 3 2 2 J := [245 x + 4624, 11 y + 4, 35 x + 272 z, z x - 15, -7 z, -13 x z - 2 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 1, 2, 2/3, 1/6, 1, 1/3, 1/12, 2/3, 6, 9, 11, 3, 3, 1, 2, 2/3, 1/6, 2/3, 1/3, 1/12, 5/12, 2, 0, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=70.2MB, alloc=56.3MB, time=1.40 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320098 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-10 x z - 20 x, 20 y - 15 z , 20 y z + 11 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-3 z + 17 z, 12 x - 9, -7 x y - 9 y ] > Problem := [F,G]; 2 2 2 Problem := [[-10 x z - 20 x, 20 y - 15 z , 20 y z + 11 z ], 2 2 2 [-3 z + 17 z, 12 x - 9, -7 x y - 9 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=47.4MB, alloc=32.3MB, time=0.84 memory used=69.3MB, alloc=56.3MB, time=1.34 memory used=111.8MB, alloc=56.3MB, time=2.20 memory used=148.2MB, alloc=80.3MB, time=2.97 memory used=201.8MB, alloc=108.3MB, time=4.07 memory used=268.3MB, alloc=132.3MB, time=5.96 memory used=346.1MB, alloc=132.3MB, time=9.05 memory used=423.5MB, alloc=156.3MB, time=12.17 memory used=524.8MB, alloc=156.3MB, time=16.24 memory used=626.2MB, alloc=180.3MB, time=20.11 N1 := 3675 > GB := Basis(F, plex(op(vars))); 3 2 2 2 GB := [x, y , 11 y + 15 y z, -4 y + 3 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=681.1MB, alloc=180.3MB, time=21.32 N2 := 1329 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-10 x z - 20 x, 20 y - 15 z , 20 y z + 11 z , -3 z + 17 z, 12 x - 9, 2 -7 x y - 9 y ] > J:=[op(GB),op(G)]; J := [ 3 2 2 2 2 2 2 x, y , 11 y + 15 y z, -4 y + 3 z , -3 z + 17 z, 12 x - 9, -7 x y - 9 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 2, 2, 2, 1/2, 1/2, 2/3, 1/3, 1/3, 1/2, 7, 10, 14, 3, 2, 3, 2, 3/7, 4/7, 3/7, 3/13, 6/13, 4/13, 0, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=785.9MB, alloc=188.3MB, time=24.30 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320133 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [6 x z - 8 y , -15 x - 6 x, 12 y - 18 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [5 y z - 7 z, -12 x - 3 x y, 4 x - 7 y z] > Problem := [F,G]; 2 2 2 Problem := [[6 x z - 8 y , -15 x - 6 x, 12 y - 18 z], 2 2 [5 y z - 7 z, -12 x - 3 x y, 4 x - 7 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.19 memory used=26.2MB, alloc=32.3MB, time=0.50 memory used=47.9MB, alloc=32.3MB, time=0.83 memory used=69.2MB, alloc=56.3MB, time=1.23 memory used=111.3MB, alloc=60.3MB, time=1.97 memory used=148.5MB, alloc=84.3MB, time=2.86 N1 := 1325 > GB := Basis(F, plex(op(vars))); 2 2 GB := [5 x + 2 x, y , z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=202.6MB, alloc=84.3MB, time=4.48 N2 := 203 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [6 x z - 8 y , -15 x - 6 x, 12 y - 18 z, 5 y z - 7 z, -12 x - 3 x y, 2 -7 z y + 4 x ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [5 x + 2 x, y , z, 5 y z - 7 z, -12 x - 3 x y, -7 z y + 4 x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 1, 2/3, 5/6, 2/3, 1/2, 5/12, 5/12, 6, 10, 11, 2, 2, 2, 1, 1/2, 2/3, 1/2, 5/11, 4/11, 4/11, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=217.6MB, alloc=84.3MB, time=4.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320138 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [13 x y + 4 z, 2 x y - 12 x z, 6 z + 8 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [3 x y + 4 x z, -3 y z + 19 y, 10 x y + 13 x z] > Problem := [F,G]; 2 Problem := [[13 x y + 4 z, 2 x y - 12 x z, 6 z + 8 y], [3 x y + 4 x z, -3 y z + 19 y, 10 x y + 13 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=46.7MB, alloc=32.3MB, time=0.76 memory used=66.2MB, alloc=32.3MB, time=1.04 memory used=84.5MB, alloc=56.3MB, time=1.32 memory used=120.6MB, alloc=60.3MB, time=1.88 memory used=156.3MB, alloc=84.3MB, time=2.58 memory used=211.2MB, alloc=108.3MB, time=3.64 memory used=283.5MB, alloc=132.3MB, time=5.01 memory used=372.0MB, alloc=164.3MB, time=6.62 memory used=473.9MB, alloc=188.3MB, time=8.44 memory used=582.1MB, alloc=212.3MB, time=11.15 memory used=696.1MB, alloc=236.3MB, time=14.55 memory used=820.8MB, alloc=260.3MB, time=18.84 memory used=960.9MB, alloc=284.3MB, time=24.24 memory used=1125.0MB, alloc=308.3MB, time=30.41 memory used=1313.1MB, alloc=308.3MB, time=37.45 memory used=1501.1MB, alloc=308.3MB, time=44.56 memory used=1689.1MB, alloc=332.3MB, time=51.62 memory used=1901.1MB, alloc=332.3MB, time=59.99 memory used=2112.8MB, alloc=332.3MB, time=68.49 memory used=2324.6MB, alloc=356.3MB, time=76.90 memory used=2560.4MB, alloc=380.3MB, time=86.42 N1 := 8271 > GB := Basis(F, plex(op(vars))); 2 GB := [39 x y + 2 y, y + 48 y, 6 z - y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 445 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [13 y x + 4 z, 2 x y - 12 x z, 6 z + 8 y, 3 x y + 4 x z, -3 y z + 19 y, 10 x y + 13 x z] > J:=[op(GB),op(G)]; 2 J := [39 x y + 2 y, y + 48 y, 6 z - y, 3 x y + 4 x z, -3 y z + 19 y, 10 x y + 13 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 16, 12, 2, 1, 1, 2, 2/3, 1, 1, 7/12, 7/12, 1/2, 6, 13, 11, 2, 1, 2, 1, 1/2, 1, 2/3, 5/12, 3/4, 1/3, 3, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2657.1MB, alloc=380.3MB, time=89.10 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320235 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [13 x - z, -y + 18 z, -13 x + 12 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-17 x z + 10 y, 13 - 17 x, 11 x y - 9 y ] > Problem := [F,G]; 2 Problem := [[13 x - z, -y + 18 z, -13 x + 12 z], 2 [-17 x z + 10 y, 13 - 17 x, 11 x y - 9 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.49 memory used=47.6MB, alloc=32.3MB, time=0.78 memory used=69.3MB, alloc=56.3MB, time=1.20 memory used=112.1MB, alloc=60.3MB, time=1.97 memory used=150.2MB, alloc=84.3MB, time=2.68 memory used=206.3MB, alloc=108.3MB, time=4.22 memory used=275.6MB, alloc=108.3MB, time=6.91 N1 := 1947 > GB := Basis(F, plex(op(vars))); 2 GB := [12 x - x, 2 y - 39 x, -13 x + 12 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=347.1MB, alloc=108.3MB, time=8.57 N2 := 419 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [13 x - z, -y + 18 z, -13 x + 12 z, -17 x z + 10 y, 13 - 17 x, 2 11 x y - 9 y ] > J:=[op(GB),op(G)]; 2 J := [12 x - x, 2 y - 39 x, -13 x + 12 z, -17 x z + 10 y, 13 - 17 x, 2 11 x y - 9 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 2, 2, 1, 5/6, 1/2, 2/3, 5/12, 1/3, 1/3, 6, 11, 9, 2, 2, 2, 1, 1, 1/2, 1/3, 7/12, 1/3, 1/6, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=355.2MB, alloc=108.3MB, time=8.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320245 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 x y + 8, -15 y + 14 y, 6 y + 11 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [3 y + 14 y, -4 x, -14 y z + 11 z ] > Problem := [F,G]; 2 Problem := [[-11 x y + 8, -15 y + 14 y, 6 y + 11 z], 2 2 [3 y + 14 y, -4 x, -14 y z + 11 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.7MB, alloc=32.3MB, time=0.54 N1 := 371 > GB := Basis(F, plex(op(vars))); GB := [77 x - 60, 15 y - 14, 55 z + 28] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=48.8MB, alloc=32.3MB, time=0.99 memory used=67.7MB, alloc=56.3MB, time=1.31 N2 := 295 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 -11 x y + 8, -15 y + 14 y, 11 z + 6 y, 3 y + 14 y, -4 x, -14 y z + 11 z ] > J:=[op(GB),op(G)]; 2 2 J := [77 x - 60, 15 y - 14, 55 z + 28, 3 y + 14 y, -4 x, -14 y z + 11 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 2, 2, 1/3, 5/6, 1/3, 1/6, 7/12, 1/4, 6, 7, 8, 2, 1, 2, 2, 1/3, 1/2, 1/3, 1/6, 1/3, 1/4, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=80.4MB, alloc=56.3MB, time=1.56 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320247 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [17 x + 7 y , -11 z - 17 y, -14 x z + 4 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [3 y - 19 y z, 2 z + 8 z, -2 x z + 12 z] > Problem := [F,G]; 2 2 2 Problem := [[17 x + 7 y , -11 z - 17 y, -14 x z + 4 y z], 2 2 [3 y - 19 y z, 2 z + 8 z, -2 x z + 12 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.50 memory used=47.4MB, alloc=32.3MB, time=0.83 memory used=68.9MB, alloc=56.3MB, time=1.24 memory used=110.6MB, alloc=84.3MB, time=2.08 N1 := 1043 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 2 GB := [x , 34 x + 49 x y, 7 y + 17 x , z x , -7 x z + 2 y z, 11 z + 17 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=167.2MB, alloc=84.3MB, time=3.60 memory used=225.3MB, alloc=84.3MB, time=4.58 memory used=284.3MB, alloc=108.3MB, time=5.76 memory used=358.9MB, alloc=132.3MB, time=8.01 N2 := 1855 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [7 y + 17 x , -11 z - 17 y, -14 x z + 4 y z, 3 y - 19 y z, 2 z + 8 z, -2 x z + 12 z] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [x , 34 x + 49 x y, 7 y + 17 x , z x , -7 x z + 2 y z, 11 z + 17 y, 2 2 3 y - 19 y z, 2 z + 8 z, -2 x z + 12 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 1/2, 2/3, 5/6, 1/4, 5/12, 2/3, 9, 17, 20, 3, 3, 2, 2, 2/3, 5/9, 2/3, 7/18, 1/3, 1/2, -5, -8, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=429.2MB, alloc=132.3MB, time=10.49 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320261 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 y - 12 x, -10 x z + 5 x, 13 x z + 18 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-20 y - 11 z, 2 + 3 x, 18 z ] > Problem := [F,G]; 2 Problem := [[-12 y - 12 x, -10 x z + 5 x, 13 x z + 18 z], 2 [-20 y - 11 z, 2 + 3 x, 18 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.8MB, alloc=32.3MB, time=0.52 memory used=47.8MB, alloc=56.3MB, time=0.95 N1 := 461 > GB := Basis(F, plex(op(vars))); 2 2 GB := [13 x + 18 x, y + x, 36 z + 13 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=87.5MB, alloc=60.3MB, time=1.62 N2 := 443 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 [-12 y - 12 x, -10 x z + 5 x, 13 x z + 18 z, -20 y - 11 z, 3 x + 2, 18 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [13 x + 18 x, y + x, 36 z + 13 x, -20 y - 11 z, 3 x + 2, 18 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 1, 2, 2, 2/3, 1/3, 2/3, 5/12, 1/6, 5/12, 6, 9, 9, 2, 2, 2, 2, 2/3, 1/3, 1/2, 5/12, 1/6, 1/4, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=98.0MB, alloc=60.3MB, time=1.87 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320264 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-19 z - z, 10 x z + 17 z , -15 y z + 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [20 x - 3 y, 11 y - 18 y z, -11 z + 17 y] > Problem := [F,G]; 2 2 Problem := [[-19 z - z, 10 x z + 17 z , -15 y z + 9 z], 2 2 [20 x - 3 y, 11 y - 18 y z, -11 z + 17 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=47.2MB, alloc=32.3MB, time=0.80 memory used=67.4MB, alloc=32.3MB, time=1.10 memory used=85.9MB, alloc=56.3MB, time=1.40 memory used=126.8MB, alloc=60.3MB, time=2.14 memory used=163.0MB, alloc=84.3MB, time=2.81 memory used=219.3MB, alloc=108.3MB, time=3.84 memory used=291.8MB, alloc=132.3MB, time=5.20 memory used=375.4MB, alloc=164.3MB, time=7.35 memory used=467.5MB, alloc=188.3MB, time=10.37 memory used=573.4MB, alloc=212.3MB, time=14.41 memory used=703.3MB, alloc=212.3MB, time=19.41 memory used=833.1MB, alloc=212.3MB, time=24.43 memory used=962.9MB, alloc=236.3MB, time=29.41 N1 := 4883 > GB := Basis(F, plex(op(vars))); 2 GB := [190 x z - 17 z, 5 y z - 3 z, 19 z + z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1118.0MB, alloc=236.3MB, time=34.37 N2 := 1421 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-19 z - z, 10 x z + 17 z , -15 y z + 9 z, -3 y + 20 x, 11 y - 18 y z, 2 -11 z + 17 y] > J:=[op(GB),op(G)]; 2 2 J := [190 x z - 17 z, 5 y z - 3 z, 19 z + z, -3 y + 20 x, 11 y - 18 y z, 2 -11 z + 17 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 1, 2, 2, 1/3, 2/3, 5/6, 1/6, 5/12, 2/3, 6, 11, 11, 2, 1, 2, 2, 1/3, 2/3, 5/6, 1/6, 5/12, 2/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1267.2MB, alloc=236.3MB, time=38.40 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320307 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [7 x z - 2, -10 x + 9 y z, 10 y z + 17 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [18 x y - 8 x z, -4 y - 9 x, -18 - 20 x] > Problem := [F,G]; 2 Problem := [[7 x z - 2, -10 x + 9 y z, 10 y z + 17 z], 2 [18 x y - 8 x z, -4 y - 9 x, -18 - 20 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.4MB, alloc=32.3MB, time=0.80 memory used=68.3MB, alloc=56.3MB, time=1.16 memory used=111.5MB, alloc=60.3MB, time=1.96 memory used=149.5MB, alloc=84.3MB, time=2.67 memory used=206.9MB, alloc=84.3MB, time=3.73 memory used=257.6MB, alloc=108.3MB, time=4.90 memory used=322.2MB, alloc=132.3MB, time=7.05 memory used=403.3MB, alloc=132.3MB, time=10.22 memory used=484.4MB, alloc=156.3MB, time=13.41 N1 := 2997 > GB := Basis(F, plex(op(vars))); 3 2 GB := [350 x + 153, 10 y + 17, 100 x + 153 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=592.7MB, alloc=164.3MB, time=16.50 N2 := 525 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [7 z x - 2, -10 x + 9 y z, 10 y z + 17 z, 18 x y - 8 x z, -4 y - 9 x, -18 - 20 x] > J:=[op(GB),op(G)]; 3 2 2 J := [350 x + 153, 10 y + 17, 100 x + 153 z, 18 x y - 8 x z, -4 y - 9 x, -18 - 20 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 1, 5/6, 2/3, 2/3, 1/2, 1/3, 5/12, 6, 10, 11, 3, 3, 2, 1, 5/6, 1/2, 1/3, 1/2, 1/4, 1/6, 3, 0, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=608.6MB, alloc=164.3MB, time=16.92 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320326 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [4 x y - 2 y , -8 x z + 16 z , x ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-8 x y - 14 z, -9 x z + 3 y, 10 x y + 12 x] > Problem := [F,G]; 2 2 2 Problem := [[4 x y - 2 y , -8 x z + 16 z , x ], [-8 x y - 14 z, -9 x z + 3 y, 10 x y + 12 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=48.7MB, alloc=32.3MB, time=0.89 memory used=68.3MB, alloc=56.3MB, time=1.24 N1 := 689 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x , -2 x y + y , -x z + 2 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=107.0MB, alloc=56.3MB, time=2.07 memory used=147.2MB, alloc=84.3MB, time=2.79 N2 := 689 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [4 x y - 2 y , -8 x z + 16 z , x , -8 x y - 14 z, -9 x z + 3 y, 10 x y + 12 x] > J:=[op(GB),op(G)]; 2 2 2 J := [x , -2 x y + y , -x z + 2 z , -8 x y - 14 z, -9 x z + 3 y, 10 x y + 12 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 2, 1, 2/3, 1/2, 7/12, 5/12, 1/3, 6, 13, 12, 2, 2, 2, 2, 1, 2/3, 1/2, 7/12, 5/12, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=173.1MB, alloc=84.3MB, time=3.42 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320330 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [19 x + 17 x, -4 x y + 20 y , 17 x z + 10 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [10 + y, 12 y z - 10, -13 y z + 4 x] > Problem := [F,G]; 2 2 2 Problem := [[19 x + 17 x, -4 x y + 20 y , 17 x z + 10 z ], [10 + y, 12 y z - 10, -13 y z + 4 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.6MB, alloc=32.3MB, time=0.81 memory used=68.3MB, alloc=56.3MB, time=1.18 memory used=109.2MB, alloc=84.3MB, time=1.98 N1 := 1029 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [19 x + 17 x, -x y + 5 y , 17 x z + 10 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=165.2MB, alloc=84.3MB, time=3.29 memory used=225.8MB, alloc=108.3MB, time=4.39 N2 := 1029 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [19 x + 17 x, -4 x y + 20 y , 17 x z + 10 z , y + 10, 12 y z - 10, -13 z y + 4 x] > J:=[op(GB),op(G)]; 2 2 2 J := [19 x + 17 x, -x y + 5 y , 17 x z + 10 z , y + 10, 12 y z - 10, -13 z y + 4 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/3, 6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=271.8MB, alloc=108.3MB, time=5.74 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320337 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [5 x y + 14 y z, 16 y z + 1, 19 x + 7 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-11 x + 18 z, 18 z - 5 y, 13 x + 5 z] > Problem := [F,G]; 2 2 Problem := [[5 x y + 14 y z, 16 y z + 1, 19 x + 7 y ], 2 2 [-11 x + 18 z, 18 z - 5 y, 13 x + 5 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.50 memory used=47.6MB, alloc=32.3MB, time=0.81 memory used=67.9MB, alloc=32.3MB, time=1.13 memory used=88.1MB, alloc=56.3MB, time=1.46 memory used=128.2MB, alloc=60.3MB, time=2.06 memory used=166.6MB, alloc=84.3MB, time=2.66 memory used=224.2MB, alloc=84.3MB, time=3.56 memory used=278.7MB, alloc=116.3MB, time=4.47 memory used=353.7MB, alloc=140.3MB, time=5.88 memory used=445.8MB, alloc=164.3MB, time=7.58 memory used=549.9MB, alloc=188.3MB, time=9.64 memory used=660.1MB, alloc=212.3MB, time=12.79 memory used=775.7MB, alloc=236.3MB, time=17.22 memory used=912.3MB, alloc=260.3MB, time=22.59 memory used=1072.8MB, alloc=260.3MB, time=28.94 memory used=1233.4MB, alloc=284.3MB, time=35.33 N1 := 5095 > GB := Basis(F, plex(op(vars))); 4 3 GB := [30400 x + 343, 760 x + 49 y, 14 z + 5 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1423.5MB, alloc=284.3MB, time=41.59 N2 := 1531 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [5 x y + 14 y z, 16 z y + 1, 7 y + 19 x , -11 x + 18 z, 18 z - 5 y, 5 z + 13 x] > J:=[op(GB),op(G)]; 4 3 2 2 J := [30400 x + 343, 760 x + 49 y, 14 z + 5 x, -11 x + 18 z, 18 z - 5 y, 5 z + 13 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 2, 2, 2, 2/3, 2/3, 5/6, 1/3, 5/12, 5/12, 6, 11, 13, 4, 4, 1, 2, 5/6, 1/3, 2/3, 5/12, 1/6, 1/3, 2, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1588.9MB, alloc=284.3MB, time=46.15 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320388 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-4 y - 13 z , 13 x z - 12 y z, 13 x z + 19 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [20 x - 15 y z, -16 x - 10 z , 3 x y + z ] > Problem := [F,G]; 2 2 2 Problem := [[-4 y - 13 z , 13 x z - 12 y z, 13 x z + 19 y ], 2 2 2 2 [20 x - 15 y z, -16 x - 10 z , 3 x y + z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.7MB, alloc=32.3MB, time=0.52 memory used=46.6MB, alloc=32.3MB, time=0.82 memory used=67.0MB, alloc=56.3MB, time=1.22 N1 := 327 > GB := Basis(F, plex(op(vars))); 2 3 2 2 2 2 GB := [x y , y , 13 z x + 19 y , 19 y + 12 y z, 13 z + 4 y ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=105.8MB, alloc=60.3MB, time=1.88 memory used=144.1MB, alloc=60.3MB, time=2.48 N2 := 367 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-4 y - 13 z , 13 x z - 12 y z, 13 z x + 19 y , 20 x - 15 y z, 2 2 2 -16 x - 10 z , z + 3 y x] > J:=[op(GB),op(G)]; 2 3 2 2 2 2 2 J := [x y , y , 13 z x + 19 y , 19 y + 12 y z, 13 z + 4 y , 20 x - 15 y z, 2 2 2 -16 x - 10 z , z + 3 y x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 16, 12, 2, 2, 2, 2, 5/6, 5/6, 1, 5/12, 5/12, 7/12, 8, 18, 18, 3, 2, 3, 2, 5/8, 7/8, 3/4, 5/16, 1/2, 3/8, -2, -6, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=173.8MB, alloc=60.3MB, time=3.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320392 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-11 y + 14, -5 x z - 10, -4 x z + 6 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-12 y - 10 z, -x + 12 x y, 3 z + 7 z] > Problem := [F,G]; 2 Problem := [[-11 y + 14, -5 x z - 10, -4 x z + 6 z], 2 2 [-12 y - 10 z, -x + 12 x y, 3 z + 7 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.83 memory used=68.3MB, alloc=56.3MB, time=1.22 memory used=109.2MB, alloc=56.3MB, time=1.96 memory used=145.0MB, alloc=84.3MB, time=2.68 memory used=197.9MB, alloc=108.3MB, time=4.25 memory used=267.4MB, alloc=108.3MB, time=6.81 N1 := 2115 > GB := Basis(F, plex(op(vars))); 2 GB := [2 x - 3, 11 y - 14, 3 z + 4] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=337.2MB, alloc=108.3MB, time=8.50 memory used=417.5MB, alloc=132.3MB, time=10.31 N2 := 1353 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-11 y + 14, -5 x z - 10, -4 x z + 6 z, -12 y - 10 z, -x + 12 x y, 2 3 z + 7 z] > J:=[op(GB),op(G)]; 2 2 2 J := [2 x - 3, 11 y - 14, 3 z + 4, -12 y - 10 z, -x + 12 x y, 3 z + 7 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 2, 2, 1/2, 1/2, 2/3, 1/3, 1/4, 1/2, 6, 8, 9, 2, 2, 2, 2, 1/3, 1/2, 1/2, 1/4, 1/4, 1/3, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=459.9MB, alloc=132.3MB, time=11.79 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320405 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [17 y - 4, -19 x + 8 x, 17 x y + 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-11 x - 18 y , 3 y z + 2 y, x z - 16 z ] > Problem := [F,G]; 2 2 Problem := [[17 y - 4, -19 x + 8 x, 17 x y + 2 z], 2 2 2 [-11 x - 18 y , 3 y z + 2 y, x z - 16 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=47.5MB, alloc=32.3MB, time=0.80 memory used=68.5MB, alloc=56.3MB, time=1.20 memory used=109.6MB, alloc=80.3MB, time=2.18 N1 := 895 > GB := Basis(F, plex(op(vars))); 2 2 GB := [19 x - 8 x, 17 y - 4, 17 y x + 2 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=148.1MB, alloc=80.3MB, time=2.91 memory used=210.1MB, alloc=84.3MB, time=3.98 N2 := 895 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [17 y - 4, -19 x + 8 x, 17 y x + 2 z, -11 x - 18 y , 3 y z + 2 y, 2 x z - 16 z ] > J:=[op(GB),op(G)]; 2 2 2 2 J := [19 x - 8 x, 17 y - 4, 17 y x + 2 z, -11 x - 18 y , 3 y z + 2 y, 2 x z - 16 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 12, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/3, 6, 11, 12, 2, 2, 2, 2, 2/3, 2/3, 1/2, 5/12, 5/12, 1/3, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=238.9MB, alloc=84.3MB, time=4.87 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320411 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-6 x y + 15 y, -17 x + 12 y, 7 x z + 16 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-12 - 4 z, 8 x y + 7 x z, -10 x y + 13 y z] > Problem := [F,G]; 2 Problem := [[-6 x y + 15 y, -17 x + 12 y, 7 x z + 16 y z], [-12 - 4 z, 8 x y + 7 x z, -10 x y + 13 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.49 memory used=47.9MB, alloc=32.3MB, time=0.85 memory used=67.9MB, alloc=56.3MB, time=1.23 memory used=107.7MB, alloc=84.3MB, time=2.02 memory used=163.1MB, alloc=84.3MB, time=3.92 N1 := 1395 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [2 x - 5 x , -17 x + 12 y, z x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=216.2MB, alloc=84.3MB, time=4.90 N2 := 847 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-6 x y + 15 y, -17 x + 12 y, 7 x z + 16 y z, -12 - 4 z, 8 x y + 7 x z, -10 x y + 13 y z] > J:=[op(GB),op(G)]; J := [ 3 2 2 2 x - 5 x , -17 x + 12 y, z x, -12 - 4 z, 8 x y + 7 x z, -10 x y + 13 y z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 11, 2, 2, 1, 1, 5/6, 5/6, 2/3, 1/2, 7/12, 5/12, 6, 12, 12, 3, 3, 1, 1, 5/6, 1/2, 2/3, 7/12, 1/3, 1/3, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=263.1MB, alloc=84.3MB, time=6.11 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320417 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-15 x - 7 y, 18 x y - 4 y , 11 y z + 17 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-10 x - 20 y, -7 z - 13 y, -17 x + 15 x] > Problem := [F,G]; 2 2 Problem := [[-15 x - 7 y, 18 x y - 4 y , 11 y z + 17 x], 2 2 2 [-10 x - 20 y, -7 z - 13 y, -17 x + 15 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.52 memory used=49.2MB, alloc=56.3MB, time=0.93 memory used=92.8MB, alloc=60.3MB, time=1.73 memory used=130.1MB, alloc=84.3MB, time=2.81 N1 := 1065 > GB := Basis(F, plex(op(vars))); 2 GB := [10 x + 21 x, 2 y - 9 x, 99 x z + 34 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=187.4MB, alloc=84.3MB, time=4.03 N2 := 701 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-15 x - 7 y, 18 x y - 4 y , 11 z y + 17 x, -10 x - 20 y, -7 z - 13 y, 2 -17 x + 15 x] > J:=[op(GB),op(G)]; 2 2 2 J := [10 x + 21 x, 2 y - 9 x, 99 x z + 34 x, -10 x - 20 y, -7 z - 13 y, 2 -17 x + 15 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 5/6, 1/3, 1/2, 1/2, 1/6, 6, 10, 11, 2, 2, 1, 2, 5/6, 1/2, 1/3, 2/3, 1/4, 1/6, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=227.6MB, alloc=84.3MB, time=5.01 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320423 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [z + 3, 7 x y - 4 z, 11 y z - 7 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [16 x y - 18 z, 11 y z - 12 x, -14 x - 13 y] > Problem := [F,G]; 2 Problem := [[z + 3, 7 x y - 4 z, 11 y z - 7 x], 2 [16 x y - 18 z, 11 y z - 12 x, -14 x - 13 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=32.3MB, time=0.80 memory used=67.8MB, alloc=32.3MB, time=1.12 memory used=86.6MB, alloc=56.3MB, time=1.43 memory used=125.7MB, alloc=60.3MB, time=2.05 memory used=161.5MB, alloc=84.3MB, time=2.63 memory used=216.3MB, alloc=84.3MB, time=3.47 memory used=269.1MB, alloc=108.3MB, time=4.45 memory used=340.9MB, alloc=140.3MB, time=5.78 memory used=430.0MB, alloc=164.3MB, time=7.44 memory used=536.2MB, alloc=188.3MB, time=9.56 memory used=655.9MB, alloc=212.3MB, time=12.45 memory used=781.9MB, alloc=236.3MB, time=16.57 memory used=916.0MB, alloc=260.3MB, time=21.91 memory used=1069.2MB, alloc=284.3MB, time=28.19 memory used=1246.3MB, alloc=284.3MB, time=35.47 memory used=1423.4MB, alloc=308.3MB, time=42.72 memory used=1624.8MB, alloc=332.3MB, time=51.05 N1 := 5543 > GB := Basis(F, plex(op(vars))); 2 2 GB := [49 x + 132, 11 y - 4, -7 x y + 4 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1722.4MB, alloc=332.3MB, time=53.26 N2 := 1435 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [z + 3, 7 y x - 4 z, 11 y z - 7 x, 16 x y - 18 z, 11 y z - 12 x, 2 -14 x - 13 y] > J:=[op(GB),op(G)]; 2 2 J := [49 x + 132, 11 y - 4, -7 x y + 4 z, 16 x y - 18 z, 11 y z - 12 x, 2 -14 x - 13 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 15, 12, 2, 2, 1, 2, 5/6, 5/6, 5/6, 5/12, 5/12, 5/12, 6, 13, 12, 2, 2, 2, 1, 5/6, 5/6, 1/2, 5/12, 5/12, 1/4, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1848.5MB, alloc=588.3MB, time=57.30 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320490 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [13 x y, -12 y - z , -9 y z + 11 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [15 y - 17 z , 13 z + 15 z, 6 z - 13] > Problem := [F,G]; 2 2 Problem := [[13 x y, -12 y - z , -9 y z + 11 y], 2 2 2 2 [15 y - 17 z , 13 z + 15 z, 6 z - 13]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.4MB, alloc=32.3MB, time=0.51 memory used=48.5MB, alloc=56.3MB, time=0.92 N1 := 615 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [x y, 972 y + 121 y, 9 y z - 11 y, z + 12 y ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=88.2MB, alloc=56.3MB, time=1.68 memory used=130.6MB, alloc=56.3MB, time=2.56 N2 := 615 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 2 13 x y, -12 y - z , -9 y z + 11 y, -17 z + 15 y , 13 z + 15 z, 6 z - 13 ] > J:=[op(GB),op(G)]; 3 2 2 2 2 J := [x y, 972 y + 121 y, 9 y z - 11 y, z + 12 y , -17 z + 15 y , 2 2 13 z + 15 z, 6 z - 13] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 12, 2, 1, 2, 2, 1/6, 2/3, 5/6, 1/13, 5/13, 6/13, 7, 11, 15, 3, 1, 3, 2, 1/7, 5/7, 5/7, 1/14, 1/2, 3/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=130.8MB, alloc=56.3MB, time=2.58 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320493 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-13 x - 9 z, -5 y - 16 x, 14 y + 17 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [5 x y - 19 y z, 18 x y + 14 z, 15 z + 8 y] > Problem := [F,G]; 2 2 Problem := [[-13 x - 9 z, -5 y - 16 x, 14 y + 17 y], 2 [5 x y - 19 y z, 18 x y + 14 z, 15 z + 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=31.7MB, alloc=40.3MB, time=0.56 memory used=59.8MB, alloc=40.3MB, time=0.97 memory used=85.3MB, alloc=64.3MB, time=1.38 memory used=132.4MB, alloc=92.3MB, time=2.27 memory used=198.2MB, alloc=92.3MB, time=3.52 memory used=258.1MB, alloc=116.3MB, time=4.72 memory used=337.5MB, alloc=148.3MB, time=6.25 memory used=429.2MB, alloc=172.3MB, time=8.36 memory used=528.4MB, alloc=196.3MB, time=11.64 memory used=639.0MB, alloc=220.3MB, time=15.76 memory used=763.6MB, alloc=244.3MB, time=20.85 memory used=912.3MB, alloc=244.3MB, time=26.91 memory used=1060.9MB, alloc=244.3MB, time=32.84 memory used=1209.5MB, alloc=268.3MB, time=38.89 memory used=1382.2MB, alloc=268.3MB, time=45.57 N1 := 5781 > GB := Basis(F, plex(op(vars))); 2 GB := [3136 x + 1445 x, -224 x + 85 y, 9 z + 13 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=1558.3MB, alloc=268.3MB, time=51.20 memory used=1671.4MB, alloc=524.3MB, time=53.38 memory used=1870.1MB, alloc=548.3MB, time=59.04 memory used=2055.6MB, alloc=572.3MB, time=66.84 N2 := 3281 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-13 x - 9 z, -5 y - 16 x, 14 y + 17 y, 5 x y - 19 y z, 18 x y + 14 z, 2 15 z + 8 y] > J:=[op(GB),op(G)]; 2 J := [3136 x + 1445 x, -224 x + 85 y, 9 z + 13 x, 5 x y - 19 y z, 2 18 x y + 14 z, 15 z + 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 11, 2, 1, 2, 2, 2/3, 5/6, 2/3, 1/3, 7/12, 1/3, 6, 13, 10, 2, 2, 1, 2, 5/6, 2/3, 2/3, 1/2, 5/12, 1/3, 0, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=2122.8MB, alloc=572.3MB, time=69.45 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320599 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-6 x z + 13 x, 19 y - 16 y, -14 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [15 x + 13 y z, -2 x + 7 y , -11 x + 2 y] > Problem := [F,G]; 2 Problem := [[-6 x z + 13 x, 19 y - 16 y, -14 x], 2 2 2 2 [15 x + 13 y z, -2 x + 7 y , -11 x + 2 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.50 memory used=48.8MB, alloc=32.3MB, time=0.91 memory used=68.1MB, alloc=56.3MB, time=1.25 memory used=108.1MB, alloc=84.3MB, time=2.12 N1 := 1041 > GB := Basis(F, plex(op(vars))); 2 GB := [x, 19 y - 16 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=166.4MB, alloc=84.3MB, time=3.58 N2 := 411 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-6 x z + 13 x, 19 y - 16 y, -14 x, 13 z y + 15 x , -2 x + 7 y , 2 -11 x + 2 y] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x, 19 y - 16 y, 13 z y + 15 x , -2 x + 7 y , -11 x + 2 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 1, 5/6, 2/3, 1/3, 1/2, 5/12, 1/6, 5, 9, 9, 2, 2, 2, 1, 4/5, 4/5, 1/5, 4/9, 5/9, 1/9, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=187.6MB, alloc=84.3MB, time=4.04 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320605 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-13 y - z, -8 x z + 14 x, 9 x z - 11 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-12 x y + 17 y , 8 - 17 z, -2 x y - 4 z ] > Problem := [F,G]; 2 Problem := [[-13 y - z, -8 x z + 14 x, 9 x z - 11 z ], 2 2 [-12 x y + 17 y , 8 - 17 z, -2 x y - 4 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=47.5MB, alloc=32.3MB, time=0.88 memory used=67.9MB, alloc=56.3MB, time=1.26 memory used=108.1MB, alloc=60.3MB, time=1.90 memory used=143.9MB, alloc=84.3MB, time=2.44 memory used=201.7MB, alloc=116.3MB, time=3.46 memory used=276.7MB, alloc=140.3MB, time=4.94 memory used=367.7MB, alloc=164.3MB, time=6.63 memory used=471.6MB, alloc=188.3MB, time=8.57 memory used=581.3MB, alloc=212.3MB, time=11.14 memory used=691.8MB, alloc=236.3MB, time=14.60 memory used=813.8MB, alloc=260.3MB, time=18.41 memory used=944.8MB, alloc=284.3MB, time=23.43 memory used=1099.4MB, alloc=308.3MB, time=29.80 memory used=1278.0MB, alloc=332.3MB, time=37.17 memory used=1480.5MB, alloc=332.3MB, time=45.35 memory used=1683.1MB, alloc=332.3MB, time=53.58 memory used=1885.6MB, alloc=356.3MB, time=61.77 memory used=2112.0MB, alloc=356.3MB, time=70.90 memory used=2338.4MB, alloc=380.3MB, time=80.01 memory used=2588.7MB, alloc=380.3MB, time=90.04 memory used=2839.2MB, alloc=404.3MB, time=100.02 N1 := 8707 > GB := Basis(F, plex(op(vars))); 2 2 GB := [36 x - 77 x, 52 x y + 7 x, 7436 y - 63 x, z + 13 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=2923.5MB, alloc=404.3MB, time=101.93 memory used=3255.4MB, alloc=660.3MB, time=112.93 N2 := 2499 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-13 y - z, -8 x z + 14 x, 9 x z - 11 z , -12 x y + 17 y , 8 - 17 z, 2 -2 x y - 4 z ] > J:=[op(GB),op(G)]; 2 2 2 J := [36 x - 77 x, 52 x y + 7 x, 7436 y - 63 x, z + 13 y, -12 x y + 17 y , 2 8 - 17 z, -2 x y - 4 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 2, 2, 2/3, 1/2, 5/6, 5/12, 1/3, 1/2, 7, 13, 12, 2, 2, 2, 2, 5/7, 5/7, 3/7, 1/2, 3/7, 3/14, -1, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=3292.2MB, alloc=660.3MB, time=114.37 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320734 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [12 y - 7 y, 10 x - 7 x, 16 z - 11 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-20 x z - z , -z - 19 x, 12 x z - 7 z ] > Problem := [F,G]; 2 2 2 Problem := [[12 y - 7 y, 10 x - 7 x, 16 z - 11 z], 2 2 2 [-20 x z - z , -z - 19 x, 12 x z - 7 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.48 memory used=49.2MB, alloc=32.3MB, time=0.89 memory used=69.0MB, alloc=56.3MB, time=1.27 N1 := 785 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [10 x - 7 x, 12 y - 7 y, 16 z - 11 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=108.0MB, alloc=56.3MB, time=2.18 memory used=147.5MB, alloc=60.3MB, time=2.87 memory used=185.4MB, alloc=84.3MB, time=3.84 N2 := 785 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [12 y - 7 y, 10 x - 7 x, 16 z - 11 z, -20 x z - z , -z - 19 x, 2 12 x z - 7 z ] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [10 x - 7 x, 12 y - 7 y, 16 z - 11 z, -20 x z - z , -z - 19 x, 2 12 x z - 7 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 12, 2, 2, 2, 2, 2/3, 1/6, 2/3, 5/12, 1/6, 7/12, 6, 9, 12, 2, 2, 2, 2, 2/3, 1/6, 2/3, 5/12, 1/6, 7/12, 0, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=187.4MB, alloc=84.3MB, time=3.90 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320738 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-16 x z - 3 z, -12 y z - 8 z, -13 x + 15] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [20 x z - 19 z, 8 y z + 10, -2 - 14 z] > Problem := [F,G]; 2 Problem := [[-16 x z - 3 z, -12 y z - 8 z, -13 x + 15], [20 x z - 19 z, 8 y z + 10, -2 - 14 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.7MB, alloc=32.3MB, time=0.53 N1 := 405 > GB := Basis(F, plex(op(vars))); 2 GB := [13 x - 15, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.6MB, alloc=32.3MB, time=0.93 N2 := 217 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 H := [-16 x z - 3 z, -12 y z - 8 z, -13 x + 15, 20 x z - 19 z, 8 y z + 10, -2 - 14 z] > J:=[op(GB),op(G)]; 2 J := [13 x - 15, z, 20 x z - 19 z, 8 y z + 10, -2 - 14 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 11, 2, 2, 1, 1, 1/2, 1/3, 5/6, 1/4, 1/6, 2/3, 5, 7, 8, 2, 2, 1, 1, 2/5, 1/5, 4/5, 2/9, 1/9, 5/9, 3, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=62.8MB, alloc=32.3MB, time=1.18 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320739 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-12 x - 2 z, 10 x + 4, 17 x + 20 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-6 x y - 7 y , 13 x - 19 y, -18 x y - 10 y z] > Problem := [F,G]; 2 2 Problem := [[-12 x - 2 z, 10 x + 4, 17 x + 20 z], 2 2 [-6 x y - 7 y , 13 x - 19 y, -18 x y - 10 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.5MB, alloc=32.3MB, time=0.51 memory used=48.4MB, alloc=56.3MB, time=0.93 N1 := 359 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 87 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-12 x - 2 z, 10 x + 4, 17 x + 20 z, -6 x y - 7 y , 13 x - 19 y, -18 x y - 10 y z] > J:=[op(GB),op(G)]; 2 2 J := [1, -6 x y - 7 y , 13 x - 19 y, -18 x y - 10 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 1, 1, 1/2, 1/2, 1/2, 5/12, 1/4, 4, 7, 6, 2, 2, 2, 1, 3/4, 3/4, 1/4, 3/7, 5/7, 1/7, 5, 5, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=60.0MB, alloc=56.3MB, time=1.11 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320741 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-18 z, -8 x + 18 y , -6 x y + 14] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [2 + 9 z, -3 z - 9, x + 16 y ] > Problem := [F,G]; Problem := 2 2 2 2 2 [[-18 z, -8 x + 18 y , -6 x y + 14], [2 + 9 z, -3 z - 9, x + 16 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.49 N1 := 205 > GB := Basis(F, plex(op(vars))); 4 3 GB := [4 x - 49, -4 x + 21 y, z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=47.3MB, alloc=32.3MB, time=0.85 N2 := 105 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [-18 z, -8 x + 18 y , -6 x y + 14, 9 z + 2, -3 z - 9, 16 y + x ] > J:=[op(GB),op(G)]; 4 3 2 2 2 J := [4 x - 49, -4 x + 21 y, z, 9 z + 2, -3 z - 9, 16 y + x ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/4, 1/4, 1/4, 6, 8, 13, 4, 4, 2, 2, 1/2, 1/3, 1/2, 3/11, 2/11, 3/11, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=62.1MB, alloc=32.3MB, time=1.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320742 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [18 x y, 3 - 6 x, -15 x + 3 x z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [x + 5 x z, 2 x z - 3 x, -11 x + 6 x z] > Problem := [F,G]; 2 Problem := [[18 x y, 3 - 6 x, -15 x + 3 x z], 2 2 [x + 5 x z, 2 x z - 3 x, -11 x + 6 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.8MB, alloc=32.3MB, time=0.53 N1 := 267 > GB := Basis(F, plex(op(vars))); GB := [2 x - 1, y, 2 z - 5] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=46.9MB, alloc=32.3MB, time=0.86 N2 := 321 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [18 x y, 3 - 6 x, -15 x + 3 x z, x + 5 x z, 2 x z - 3 x, -11 x + 6 x z] > J:=[op(GB),op(G)]; 2 2 J := [2 x - 1, y, 2 z - 5, x + 5 x z, 2 x z - 3 x, -11 x + 6 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 1, 1, 1, 1/6, 2/3, 10/13, 1/13, 4/13, 6, 9, 9, 2, 2, 1, 1, 2/3, 1/6, 2/3, 7/11, 1/11, 4/11, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=66.6MB, alloc=32.3MB, time=1.22 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320743 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-17 x - 16 y , -20 x + 19 y, 18 - 2 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-12 x y - 16, -2 y z - 20 y, -10 x z - 12 z ] > Problem := [F,G]; 2 2 2 Problem := [[-17 x - 16 y , -20 x + 19 y, 18 - 2 z], 2 [-12 x y - 16, -2 y z - 20 y, -10 x z - 12 z ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=47.9MB, alloc=32.3MB, time=0.83 memory used=68.3MB, alloc=56.3MB, time=1.24 N1 := 479 > GB := Basis(F, plex(op(vars))); 4 2 2 GB := [6400 x + 6137 x , -20 x + 19 y, z - 9] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.5MB, alloc=60.3MB, time=1.86 N2 := 479 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-17 x - 16 y , -20 x + 19 y, 18 - 2 z, -12 x y - 16, -2 y z - 20 y, 2 -10 x z - 12 z ] > J:=[op(GB),op(G)]; 4 2 2 J := [6400 x + 6137 x , -20 x + 19 y, z - 9, -12 x y - 16, -2 y z - 20 y, 2 -10 x z - 12 z ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 11, 2, 2, 2, 2, 2/3, 2/3, 1/2, 1/3, 5/12, 1/3, 6, 10, 13, 4, 4, 1, 2, 2/3, 1/2, 1/2, 5/12, 1/3, 1/3, 1, -2, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=126.0MB, alloc=60.3MB, time=2.26 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320746 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-7 x y + 15 z , -19 + 7 z, 18 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-19 x z + 19 y, -7 x y - x, -11 y - 8 y z] > Problem := [F,G]; 2 Problem := [[-7 x y + 15 z , -19 + 7 z, 18 y], 2 [-19 x z + 19 y, -7 x y - x, -11 y - 8 y z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.49 memory used=47.4MB, alloc=32.3MB, time=0.79 memory used=67.0MB, alloc=56.3MB, time=1.13 memory used=110.3MB, alloc=60.3MB, time=1.92 memory used=148.9MB, alloc=84.3MB, time=2.63 memory used=206.6MB, alloc=108.3MB, time=3.71 memory used=280.0MB, alloc=140.3MB, time=5.49 memory used=360.9MB, alloc=164.3MB, time=8.43 memory used=461.2MB, alloc=164.3MB, time=12.27 memory used=561.7MB, alloc=188.3MB, time=16.07 N1 := 3073 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 99 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; H := [ 2 2 -7 x y + 15 z , 7 z - 19, 18 y, -19 x z + 19 y, -7 x y - x, -11 y - 8 y z] > J:=[op(GB),op(G)]; 2 J := [1, -19 x z + 19 y, -7 x y - x, -11 y - 8 y z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 10, 2, 1, 2, 2, 1/2, 5/6, 2/3, 1/3, 1/2, 1/3, 4, 7, 6, 2, 1, 2, 1, 1/2, 3/4, 1/2, 3/7, 4/7, 2/7, 5, 4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=575.7MB, alloc=188.3MB, time=16.31 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320764 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [16 z - y, 3 x z + 9 y z, -17 x ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [15 x z + 6 z , 13 x - 10 x z, -x y - 7 z] > Problem := [F,G]; 2 2 Problem := [[16 z - y, 3 x z + 9 y z, -17 x ], 2 2 [15 x z + 6 z , 13 x - 10 x z, -x y - 7 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.6MB, alloc=32.3MB, time=0.50 memory used=47.9MB, alloc=32.3MB, time=0.82 memory used=67.6MB, alloc=56.3MB, time=1.14 memory used=110.0MB, alloc=60.3MB, time=1.95 memory used=146.7MB, alloc=84.3MB, time=2.66 memory used=204.2MB, alloc=108.3MB, time=3.78 memory used=275.6MB, alloc=140.3MB, time=5.42 memory used=355.8MB, alloc=164.3MB, time=8.12 memory used=451.0MB, alloc=164.3MB, time=11.95 memory used=546.2MB, alloc=188.3MB, time=15.72 memory used=665.7MB, alloc=212.3MB, time=20.18 N1 := 3623 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x , x y + 3 y , x z + 3 y z, 16 z - y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=796.1MB, alloc=212.3MB, time=22.62 memory used=954.2MB, alloc=492.3MB, time=25.93 memory used=1103.2MB, alloc=516.3MB, time=31.63 memory used=1269.1MB, alloc=540.3MB, time=38.20 N2 := 3623 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 16 z - y, 3 x z + 9 y z, -17 x , 15 x z + 6 z , 13 x - 10 x z, -x y - 7 z ] > J:=[op(GB),op(G)]; 2 2 2 2 2 J := [x , x y + 3 y , x z + 3 y z, 16 z - y, 15 x z + 6 z , 13 x - 10 x z, -x y - 7 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 1, 2, 5/6, 1/2, 5/6, 1/2, 1/4, 7/12, 7, 15, 14, 2, 2, 2, 2, 6/7, 4/7, 5/7, 1/2, 5/14, 1/2, -2, -2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1349.6MB, alloc=540.3MB, time=41.09 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320810 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [17 x + 20, -8 y + 12, 3 x z + 5 y ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [19 + 12 y, -9 x z - 9 z , -4 z + 10 z] > Problem := [F,G]; 2 2 2 Problem := [[17 x + 20, -8 y + 12, 3 x z + 5 y ], 2 2 [19 + 12 y, -9 x z - 9 z , -4 z + 10 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.2MB, alloc=32.3MB, time=0.51 memory used=48.3MB, alloc=32.3MB, time=0.88 memory used=67.5MB, alloc=56.3MB, time=1.24 memory used=107.3MB, alloc=56.3MB, time=1.95 memory used=141.7MB, alloc=84.3MB, time=2.69 memory used=192.3MB, alloc=108.3MB, time=4.31 memory used=263.2MB, alloc=108.3MB, time=6.66 N1 := 1953 > GB := Basis(F, plex(op(vars))); 2 2 GB := [17 x + 20, 2 y - 3, 8 z - 17 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 385 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [17 x + 20, -8 y + 12, 3 z x + 5 y , 12 y + 19, -9 x z - 9 z , 2 -4 z + 10 z] > J:=[op(GB),op(G)]; 2 2 2 2 J := [17 x + 20, 2 y - 3, 8 z - 17 x, 12 y + 19, -9 x z - 9 z , -4 z + 10 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 11, 2, 2, 2, 2, 1/2, 1/2, 1/2, 1/4, 1/4, 5/12, 6, 8, 10, 2, 2, 2, 2, 1/2, 1/3, 1/2, 1/4, 1/6, 5/12, 1, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=304.8MB, alloc=108.3MB, time=7.39 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320818 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-8 z + 12, 7 x z - 5 y, -x y + 3] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [5 x y + 15 x z, -20 y z - 18 z , -12 - 7 x] > Problem := [F,G]; 2 Problem := [[-8 z + 12, 7 x z - 5 y, -x y + 3], 2 [5 x y + 15 x z, -20 y z - 18 z , -12 - 7 x]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.48 memory used=47.3MB, alloc=32.3MB, time=0.80 memory used=68.5MB, alloc=56.3MB, time=1.20 memory used=109.8MB, alloc=60.3MB, time=1.96 memory used=146.4MB, alloc=84.3MB, time=2.62 memory used=202.2MB, alloc=84.3MB, time=3.63 memory used=251.8MB, alloc=108.3MB, time=4.52 memory used=316.5MB, alloc=132.3MB, time=6.11 memory used=393.6MB, alloc=156.3MB, time=8.54 memory used=485.3MB, alloc=180.3MB, time=12.09 memory used=601.0MB, alloc=180.3MB, time=16.51 memory used=716.7MB, alloc=180.3MB, time=20.93 memory used=832.3MB, alloc=204.3MB, time=25.35 N1 := 4577 > GB := Basis(F, plex(op(vars))); 4 3 2 GB := [49 x - 150, -49 x + 50 y, -7 x + 10 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=974.1MB, alloc=212.3MB, time=29.78 N2 := 857 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-8 z + 12, 7 z x - 5 y, -x y + 3, 5 x y + 15 x z, -20 y z - 18 z , -12 - 7 x] > J:=[op(GB),op(G)]; 4 3 2 2 J := [49 x - 150, -49 x + 50 y, -7 x + 10 z, 5 x y + 15 x z, -20 y z - 18 z , -12 - 7 x] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 1, 1, 2, 2/3, 2/3, 2/3, 5/12, 1/3, 5/12, 6, 11, 14, 4, 4, 1, 2, 5/6, 1/2, 1/2, 1/2, 1/4, 1/3, 1, -3, -2] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=1039.5MB, alloc=212.3MB, time=31.32 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320852 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-7 z + 8, 4 z - 14 x, 14 y z + 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-1 + 10 x, -12 x y - 6 x, -5 + y] > Problem := [F,G]; Problem := [ 2 2 [-7 z + 8, 4 z - 14 x, 14 y z + 9 z], [-1 + 10 x, -12 x y - 6 x, -5 + y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=27.0MB, alloc=32.3MB, time=0.54 N1 := 455 > GB := Basis(F, plex(op(vars))); 2 GB := [49 x - 16, 14 y + 9, 7 z - 8] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 245 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-7 z + 8, 4 z - 14 x, 14 y z + 9 z, 10 x - 1, -12 x y - 6 x, y - 5] > J:=[op(GB),op(G)]; 2 J := [49 x - 16, 14 y + 9, 7 z - 8, 10 x - 1, -12 x y - 6 x, y - 5] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 10, 2, 1, 1, 2, 1/2, 1/2, 1/2, 1/3, 1/4, 1/3, 6, 7, 8, 2, 1, 1, 2, 1/2, 1/2, 1/6, 1/3, 1/4, 1/12, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=70.5MB, alloc=64.3MB, time=1.36 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428320854 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [10 x - 7 z, 15 x z - 11 z , -2 x z - 12 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [19 x y - z, 7 x z + 9, -9 z - 16 y] > Problem := [F,G]; 2 2 2 Problem := [[10 x - 7 z, 15 x z - 11 z , -2 x z - 12 z ], 2 [19 x y - z, 7 x z + 9, -9 z - 16 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.50 memory used=46.8MB, alloc=32.3MB, time=0.80 memory used=67.0MB, alloc=32.3MB, time=1.11 memory used=85.4MB, alloc=56.3MB, time=1.41 memory used=124.1MB, alloc=60.3MB, time=2.02 memory used=158.4MB, alloc=84.3MB, time=2.56 memory used=212.0MB, alloc=108.3MB, time=3.42 memory used=284.9MB, alloc=116.3MB, time=4.63 memory used=355.9MB, alloc=140.3MB, time=6.07 memory used=442.6MB, alloc=164.3MB, time=7.77 memory used=543.3MB, alloc=188.3MB, time=9.87 memory used=657.0MB, alloc=212.3MB, time=12.14 memory used=785.4MB, alloc=236.3MB, time=14.61 memory used=923.9MB, alloc=260.3MB, time=17.27 memory used=1070.4MB, alloc=284.3MB, time=20.25 memory used=1192.2MB, alloc=564.3MB, time=22.98 memory used=1347.3MB, alloc=588.3MB, time=27.88 memory used=1504.1MB, alloc=612.3MB, time=33.34 memory used=1670.3MB, alloc=636.3MB, time=39.46 memory used=1848.8MB, alloc=660.3MB, time=46.32 memory used=2040.6MB, alloc=684.3MB, time=53.91 memory used=2244.7MB, alloc=708.3MB, time=62.51 memory used=2463.1MB, alloc=732.3MB, time=72.18 memory used=2705.6MB, alloc=756.3MB, time=82.85 memory used=2971.9MB, alloc=780.3MB, time=93.72 memory used=3262.3MB, alloc=804.3MB, time=105.26 memory used=3576.5MB, alloc=828.3MB, time=118.00 memory used=3914.8MB, alloc=852.3MB, time=132.70 memory used=4277.0MB, alloc=852.3MB, time=148.97 memory used=4639.1MB, alloc=852.3MB, time=165.18 memory used=5001.1MB, alloc=852.3MB, time=181.05 memory used=5363.2MB, alloc=876.3MB, time=196.97 memory used=5749.2MB, alloc=876.3MB, time=213.31 memory used=6135.2MB, alloc=876.3MB, time=228.86 memory used=6521.1MB, alloc=876.3MB, time=244.08 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321154 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-8 x + 18 z, -17 x y - 18 y , -8 y - 19 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-x - 12 x y, -13 y z - 20 x, -10 x y - 19] > Problem := [F,G]; 2 2 2 Problem := [[-8 x + 18 z, -17 x y - 18 y , -8 y - 19 z], 2 [-x - 12 x y, -13 y z - 20 x, -10 x y - 19]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.5MB, alloc=32.3MB, time=0.50 memory used=47.9MB, alloc=32.3MB, time=0.80 memory used=68.5MB, alloc=56.3MB, time=1.13 memory used=111.7MB, alloc=60.3MB, time=1.88 memory used=150.1MB, alloc=84.3MB, time=2.56 memory used=206.2MB, alloc=108.3MB, time=4.17 N1 := 1431 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [x , -19 x + 17 x y, 18 y + 19 x , -4 x + 9 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=280.8MB, alloc=108.3MB, time=5.73 N2 := 479 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-8 x + 18 z, -17 x y - 18 y , -8 y - 19 z, -x - 12 x y, -13 y z - 20 x, -10 x y - 19] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [x , -19 x + 17 x y, 18 y + 19 x , -4 x + 9 z, -x - 12 x y, -13 y z - 20 x, -10 x y - 19] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 2, 2, 1, 5/6, 5/6, 1/2, 1/2, 1/2, 1/4, 7, 14, 15, 3, 3, 2, 1, 1, 5/7, 2/7, 9/14, 5/14, 1/7, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=312.0MB, alloc=108.3MB, time=6.28 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321162 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [8 y - 5 y z, 12 x y + 8 z , 15 y z + 18 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [17 x + 19 z, 6 z - 19 z, -17 x y + 12 x z] > Problem := [F,G]; 2 2 Problem := [[8 y - 5 y z, 12 x y + 8 z , 15 y z + 18 x], 2 2 [17 x + 19 z, 6 z - 19 z, -17 x y + 12 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.1MB, alloc=32.3MB, time=0.46 memory used=47.0MB, alloc=32.3MB, time=0.75 memory used=66.5MB, alloc=56.3MB, time=1.05 memory used=105.1MB, alloc=60.3MB, time=1.60 memory used=140.4MB, alloc=84.3MB, time=2.14 memory used=198.1MB, alloc=92.3MB, time=3.00 memory used=250.9MB, alloc=116.3MB, time=3.81 memory used=327.6MB, alloc=116.3MB, time=4.95 memory used=401.9MB, alloc=140.3MB, time=6.11 memory used=497.4MB, alloc=140.3MB, time=7.56 memory used=588.8MB, alloc=164.3MB, time=9.01 memory used=689.9MB, alloc=188.3MB, time=10.62 memory used=784.2MB, alloc=444.3MB, time=12.17 memory used=910.0MB, alloc=468.3MB, time=14.32 memory used=1052.1MB, alloc=492.3MB, time=16.67 memory used=1213.1MB, alloc=516.3MB, time=19.40 memory used=1388.7MB, alloc=540.3MB, time=22.83 memory used=1568.5MB, alloc=564.3MB, time=26.46 memory used=1754.3MB, alloc=588.3MB, time=30.06 memory used=1944.9MB, alloc=612.3MB, time=33.74 memory used=2138.8MB, alloc=636.3MB, time=37.52 memory used=2337.1MB, alloc=660.3MB, time=41.49 memory used=2538.4MB, alloc=684.3MB, time=45.50 memory used=2743.1MB, alloc=708.3MB, time=49.58 memory used=2949.8MB, alloc=732.3MB, time=53.79 memory used=3153.7MB, alloc=756.3MB, time=58.67 memory used=3333.2MB, alloc=780.3MB, time=65.26 memory used=3517.5MB, alloc=804.3MB, time=72.02 memory used=3712.0MB, alloc=828.3MB, time=79.43 memory used=3918.7MB, alloc=852.3MB, time=87.51 memory used=4138.4MB, alloc=876.3MB, time=96.20 memory used=4371.0MB, alloc=900.3MB, time=105.70 memory used=4617.5MB, alloc=924.3MB, time=115.80 memory used=4878.5MB, alloc=948.3MB, time=126.49 memory used=5153.9MB, alloc=972.3MB, time=137.89 memory used=5444.3MB, alloc=996.3MB, time=150.31 memory used=5749.5MB, alloc=1020.3MB, time=162.97 memory used=6069.5MB, alloc=1044.3MB, time=176.34 memory used=6404.6MB, alloc=1068.3MB, time=190.38 memory used=6754.5MB, alloc=1092.3MB, time=205.27 memory used=7118.4MB, alloc=1116.3MB, time=220.85 memory used=7493.8MB, alloc=1140.3MB, time=237.55 memory used=7893.2MB, alloc=1164.3MB, time=255.15 memory used=8316.5MB, alloc=1188.3MB, time=274.06 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321462 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-20 y, -11 y + 2 z , 10 x + 16 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [11 x y + 19, -16 x - 16 x, 10 x - 11 x z] > Problem := [F,G]; 2 2 Problem := [[-20 y, -11 y + 2 z , 10 x + 16 y], 2 2 [11 x y + 19, -16 x - 16 x, 10 x - 11 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=27.2MB, alloc=32.3MB, time=0.53 memory used=48.9MB, alloc=56.3MB, time=0.93 N1 := 813 > GB := Basis(F, plex(op(vars))); 2 GB := [x, y, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=94.9MB, alloc=88.3MB, time=2.07 N2 := 109 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 H := [-20 y, -11 y + 2 z , 10 x + 16 y, 11 y x + 19, -16 x - 16 x, 2 10 x - 11 x z] > J:=[op(GB),op(G)]; 2 2 2 J := [x, y, z , 11 y x + 19, -16 x - 16 x, 10 x - 11 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 2, 2, 2, 2/3, 2/3, 1/3, 1/2, 1/3, 1/6, 6, 8, 10, 2, 2, 1, 2, 2/3, 1/3, 1/3, 3/5, 1/5, 1/5, 2, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=103.9MB, alloc=92.3MB, time=2.22 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321465 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [20 y z + 18 y, 13 y z - 20 z , 4 x y + z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 G := [10 x + 18 z , 16 z , -5 x + y] > Problem := [F,G]; 2 Problem := [[20 y z + 18 y, 13 y z - 20 z , 4 x y + z], 2 2 2 2 [10 x + 18 z , 16 z , -5 x + y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.2MB, alloc=32.3MB, time=0.44 memory used=47.4MB, alloc=32.3MB, time=0.74 memory used=67.9MB, alloc=56.3MB, time=1.09 N1 := 569 > GB := Basis(F, plex(op(vars))); 2 GB := [80 x y + 13 y, 13 y + 18 y, 20 z - 13 y] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=110.4MB, alloc=60.3MB, time=1.94 N2 := 155 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 2 2 [20 y z + 18 y, 13 y z - 20 z , 4 y x + z, 10 x + 18 z , 16 z , -5 x + y] > J:=[op(GB),op(G)]; J := 2 2 2 2 2 [80 x y + 13 y, 13 y + 18 y, 20 z - 13 y, 10 x + 18 z , 16 z , -5 x + y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 2, 1/2, 2/3, 5/6, 1/4, 5/12, 1/2, 6, 10, 11, 2, 2, 2, 2, 1/2, 2/3, 1/2, 1/4, 1/2, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=144.9MB, alloc=60.3MB, time=2.43 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321467 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [18 x y - 9 z , -14 x y - 18 y z, 13 x z - 2 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-19 x + 6 y, 6 y - 12 z, -12 x y + 18 y] > Problem := [F,G]; 2 2 Problem := [[18 x y - 9 z , -14 x y - 18 y z, 13 x z - 2 z ], [-19 x + 6 y, 6 y - 12 z, -12 x y + 18 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=26.3MB, alloc=32.3MB, time=0.45 memory used=49.4MB, alloc=32.3MB, time=0.85 memory used=68.6MB, alloc=56.3MB, time=1.21 N1 := 681 > GB := Basis(F, plex(op(vars))); 2 2 2 GB := [x y, x y , -4 x y + 13 x z, 7 x y + 9 y z, -2 x y + z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=106.5MB, alloc=60.3MB, time=1.91 N2 := 533 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [18 x y - 9 z , -14 x y - 18 y z, 13 x z - 2 z , -19 x + 6 y, 6 y - 12 z, -12 x y + 18 y] > J:=[op(GB),op(G)]; 2 2 2 J := [x y, x y , -4 x y + 13 x z, 7 x y + 9 y z, -2 x y + z , -19 x + 6 y, 6 y - 12 z, -12 x y + 18 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 10, 2, 1, 1, 2, 5/6, 5/6, 2/3, 5/12, 7/12, 5/12, 8, 19, 16, 3, 2, 2, 2, 7/8, 1, 1/2, 1/2, 5/8, 1/4, -5, -6, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=146.6MB, alloc=60.3MB, time=2.60 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321470 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [-2 z , 13 x - 13 y, -20 y - 15 y z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [-14 x y + 15 z , 3 x y - 16 y , -8 x - 20 y] > Problem := [F,G]; 2 2 Problem := [[-2 z , 13 x - 13 y, -20 y - 15 y z], 2 2 2 [-14 x y + 15 z , 3 x y - 16 y , -8 x - 20 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.2MB, alloc=32.3MB, time=0.17 memory used=57.0MB, alloc=68.3MB, time=1.02 N1 := 647 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [x , -x + y, 4 x + 3 x z, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=103.6MB, alloc=68.3MB, time=1.89 N2 := 659 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-2 z , 13 x - 13 y, -20 y - 15 y z, -14 x y + 15 z , 3 x y - 16 y , 2 -8 x - 20 y] > J:=[op(GB),op(G)]; J := [ 3 2 2 2 2 2 x , -x + y, 4 x + 3 x z, z , -14 x y + 15 z , 3 x y - 16 y , -8 x - 20 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 11, 2, 2, 2, 2, 2/3, 5/6, 1/2, 1/3, 7/12, 1/4, 7, 13, 14, 3, 3, 2, 2, 6/7, 4/7, 3/7, 1/2, 5/14, 3/14, -1, -3, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=149.0MB, alloc=68.3MB, time=2.72 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321473 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-y z + 7 x, -7 x z + 9 z , 3 x y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [-16 y + 15 y z, -5 x y, -18 x y] > Problem := [F,G]; Problem := 2 2 [[-y z + 7 x, -7 x z + 9 z , 3 x y], [-16 y + 15 y z, -5 x y, -18 x y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=27.2MB, alloc=32.3MB, time=0.51 N1 := 295 > GB := Basis(F, plex(op(vars))); 2 2 GB := [x , x y, z x, y z - 7 x, z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 71 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [-z y + 7 x, -7 x z + 9 z , 3 x y, -16 y + 15 y z, -5 x y, -18 x y] > J:=[op(GB),op(G)]; 2 2 2 J := [x , x y, z x, y z - 7 x, z , -16 y + 15 y z, -5 x y, -18 x y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 1, 2, 2, 5/6, 5/6, 1/2, 1/3, 2/5, 4/15, 8, 15, 16, 2, 2, 2, 2, 3/4, 5/8, 1/2, 1/3, 1/3, 2/9, -2, -4, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=45.1MB, alloc=32.3MB, time=0.80 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321474 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [2 y - 17 x, -7 x + 6 x z, 5 y z + 9] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [16 z + 12, -19 z + 4, 17 z + 17 z] > Problem := [F,G]; 2 2 Problem := [[2 y - 17 x, -7 x + 6 x z, 5 y z + 9], 2 2 2 [16 z + 12, -19 z + 4, 17 z + 17 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.0MB, alloc=32.3MB, time=0.48 memory used=46.6MB, alloc=32.3MB, time=0.77 memory used=66.1MB, alloc=32.3MB, time=1.04 memory used=86.6MB, alloc=56.3MB, time=1.42 memory used=127.7MB, alloc=56.3MB, time=2.13 memory used=164.0MB, alloc=80.3MB, time=2.80 memory used=195.3MB, alloc=84.3MB, time=3.42 memory used=242.3MB, alloc=108.3MB, time=4.80 memory used=307.6MB, alloc=108.3MB, time=7.07 memory used=372.9MB, alloc=132.3MB, time=9.23 N1 := 2449 > GB := Basis(F, plex(op(vars))); 3 2 GB := [20825 x - 5832, 595 x + 108 y, 6 z - 7 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 339 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ 2 2 2 2 2 2 y - 17 x, -7 x + 6 x z, 5 z y + 9, 16 z + 12, -19 z + 4, 17 z + 17 z ] > J:=[op(GB),op(G)]; 3 2 2 2 J := [20825 x - 5832, 595 x + 108 y, 6 z - 7 x, 16 z + 12, -19 z + 4, 2 17 z + 17 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 9, 12, 2, 2, 2, 2, 1/3, 1/3, 5/6, 1/4, 1/6, 1/2, 6, 8, 12, 3, 3, 1, 2, 1/2, 1/6, 2/3, 1/4, 1/12, 5/12, 1, 0, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=422.2MB, alloc=132.3MB, time=10.14 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321484 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [14 y z + z , -13 z - 16 x, 13 x y - 15 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-11 y + 16 z , -11 x y - 3 x, 11 x y - 13 x z] > Problem := [F,G]; 2 2 Problem := [[14 y z + z , -13 z - 16 x, 13 x y - 15 y], 2 2 [-11 y + 16 z , -11 x y - 3 x, 11 x y - 13 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.46 memory used=47.9MB, alloc=32.3MB, time=0.77 memory used=70.4MB, alloc=56.3MB, time=1.16 memory used=115.0MB, alloc=60.3MB, time=1.96 memory used=151.0MB, alloc=84.3MB, time=2.65 memory used=201.1MB, alloc=108.3MB, time=4.40 N1 := 1715 > GB := Basis(F, plex(op(vars))); 2 2 GB := [13 x - 15 x, 13 x y - 15 y, 637 y + 4 x, 13 x z + 210 y, 91 y z - 8 x, 2 13 z + 16 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=274.4MB, alloc=108.3MB, time=5.98 memory used=348.6MB, alloc=116.3MB, time=7.12 memory used=417.8MB, alloc=140.3MB, time=8.19 memory used=515.7MB, alloc=164.3MB, time=9.87 memory used=634.7MB, alloc=188.3MB, time=11.91 memory used=753.6MB, alloc=468.3MB, time=14.04 memory used=897.7MB, alloc=492.3MB, time=16.58 memory used=1046.7MB, alloc=516.3MB, time=20.23 memory used=1190.8MB, alloc=540.3MB, time=24.89 memory used=1342.7MB, alloc=564.3MB, time=30.74 memory used=1513.7MB, alloc=588.3MB, time=37.61 memory used=1708.6MB, alloc=612.3MB, time=45.36 memory used=1927.5MB, alloc=636.3MB, time=54.03 memory used=2170.3MB, alloc=636.3MB, time=63.63 memory used=2413.2MB, alloc=636.3MB, time=73.17 memory used=2656.1MB, alloc=660.3MB, time=82.70 memory used=2923.1MB, alloc=684.3MB, time=93.22 N2 := 8185 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [14 y z + z , -13 z - 16 x, 13 x y - 15 y, -11 y + 16 z , -11 x y - 3 x, 11 x y - 13 x z] > J:=[op(GB),op(G)]; 2 2 J := [13 x - 15 x, 13 x y - 15 y, 637 y + 4 x, 13 z x + 210 y, 91 y z - 8 x, 2 2 2 13 z + 16 x, -11 y + 16 z , -11 x y - 3 x, 11 x y - 13 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 13, 12, 2, 1, 2, 2, 2/3, 5/6, 2/3, 1/2, 1/2, 5/12, 9, 20, 18, 2, 2, 2, 2, 8/9, 7/9, 5/9, 11/18, 4/9, 5/18, -7, -6, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=3034.7MB, alloc=684.3MB, time=97.20 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321586 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 F := [20 y - 19 y z, 8 x y - 4 x z, -15 y z - 2 z ] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 G := [10 + 3 x, -18 + 11 x, 14 x + 20] > Problem := [F,G]; 2 2 Problem := [[20 y - 19 y z, 8 x y - 4 x z, -15 y z - 2 z ], 2 [10 + 3 x, -18 + 11 x, 14 x + 20]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.1MB, alloc=32.3MB, time=0.17 N1 := 147 > GB := Basis(F, plex(op(vars))); 2 3 2 2 2 GB := [x y , y , -2 x y + x z, -20 y + 19 y z, 150 y + 19 z ] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 91 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [20 y - 19 y z, 8 x y - 4 x z, -15 y z - 2 z , 3 x + 10, 11 x - 18, 2 14 x + 20] > J:=[op(GB),op(G)]; 2 3 2 2 2 J := [x y , y , -2 x y + x z, -20 y + 19 y z, 19 z + 150 y , 3 x + 10, 2 11 x - 18, 14 x + 20] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 10, 10, 2, 2, 2, 2, 2/3, 1/2, 1/2, 5/12, 1/3, 1/3, 8, 13, 16, 3, 2, 3, 2, 5/8, 5/8, 3/8, 3/8, 3/8, 3/16, -3, -6, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=44.5MB, alloc=64.3MB, time=0.79 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321587 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 F := [-3 x + 9 y , 18 x + 5 y z, 2 x z - 11 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [16 z - 10, -5 x y + 15 z, -7 x z - 4 y ] > Problem := [F,G]; 2 2 2 Problem := [[-3 x + 9 y , 18 x + 5 y z, 2 x z - 11 z], 2 2 [16 z - 10, -5 x y + 15 z, -7 x z - 4 y ]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.1MB, alloc=32.3MB, time=0.51 memory used=47.9MB, alloc=32.3MB, time=0.84 memory used=68.4MB, alloc=56.3MB, time=1.17 memory used=109.8MB, alloc=60.3MB, time=1.81 memory used=148.9MB, alloc=84.3MB, time=2.39 memory used=212.9MB, alloc=116.3MB, time=3.56 memory used=291.4MB, alloc=140.3MB, time=4.94 memory used=385.0MB, alloc=164.3MB, time=6.63 memory used=493.5MB, alloc=188.3MB, time=8.54 memory used=613.9MB, alloc=212.3MB, time=10.69 memory used=726.0MB, alloc=492.3MB, time=12.84 memory used=862.2MB, alloc=516.3MB, time=16.67 memory used=1004.4MB, alloc=540.3MB, time=21.26 memory used=1158.5MB, alloc=564.3MB, time=26.53 memory used=1322.7MB, alloc=588.3MB, time=32.93 memory used=1508.0MB, alloc=612.3MB, time=40.31 memory used=1717.3MB, alloc=636.3MB, time=48.54 memory used=1950.5MB, alloc=636.3MB, time=57.53 memory used=2183.7MB, alloc=636.3MB, time=66.53 memory used=2416.8MB, alloc=660.3MB, time=75.51 memory used=2673.9MB, alloc=660.3MB, time=85.30 memory used=2931.0MB, alloc=660.3MB, time=95.19 memory used=3187.8MB, alloc=684.3MB, time=105.05 memory used=3468.6MB, alloc=684.3MB, time=115.85 memory used=3749.5MB, alloc=684.3MB, time=126.80 memory used=4030.3MB, alloc=708.3MB, time=137.78 memory used=4335.1MB, alloc=732.3MB, time=149.56 N1 := 11135 > GB := Basis(F, plex(op(vars))); 3 2 2 2 2 GB := [2 x - 11 x , -x + 3 y , 216 x y + 605 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=4668.6MB, alloc=732.3MB, time=158.75 memory used=5019.9MB, alloc=756.3MB, time=165.70 memory used=5383.1MB, alloc=780.3MB, time=177.93 memory used=5716.7MB, alloc=804.3MB, time=192.75 memory used=6073.1MB, alloc=828.3MB, time=208.19 memory used=6453.5MB, alloc=852.3MB, time=224.57 memory used=6857.9MB, alloc=876.3MB, time=242.14 memory used=7286.6MB, alloc=900.3MB, time=260.67 N2 := 8509 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 H := [-3 x + 9 y , 5 z y + 18 x , 2 x z - 11 z, 16 z - 10, -5 x y + 15 z, 2 -7 x z - 4 y ] > J:=[op(GB),op(G)]; 3 2 2 2 2 2 J := [2 x - 11 x , -x + 3 y , 216 y x + 605 z, 16 z - 10, -5 x y + 15 z, 2 -7 x z - 4 y ] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 14, 12, 2, 2, 2, 2, 5/6, 2/3, 5/6, 5/12, 1/3, 1/2, 6, 13, 14, 3, 3, 2, 2, 5/6, 2/3, 2/3, 1/2, 1/3, 1/3, 1, -2, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=7339.1MB, alloc=900.3MB, time=262.63 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321868 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [20 x y - 7 y z, -17 x + 4, -2 x y - x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 2 2 G := [7 x + 18 y , -6 y - 12 z , -x - 4 y] > Problem := [F,G]; 2 Problem := [[20 x y - 7 y z, -17 x + 4, -2 x y - x], 2 2 2 2 2 [7 x + 18 y , -6 y - 12 z , -x - 4 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.48 memory used=48.1MB, alloc=32.3MB, time=0.83 N1 := 233 > GB := Basis(F, plex(op(vars))); 2 GB := [17 x - 4, 2 y + 1, 7 z - 20 x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=68.0MB, alloc=32.3MB, time=1.16 memory used=87.7MB, alloc=32.3MB, time=1.45 memory used=107.5MB, alloc=56.3MB, time=1.81 N2 := 233 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 2 2 2 H := [20 x y - 7 y z, -17 x + 4, -2 x y - x, 18 y + 7 x , -6 y - 12 z , 2 -x - 4 y] > J:=[op(GB),op(G)]; 2 2 2 2 2 2 J := [17 x - 4, 2 y + 1, 7 z - 20 x, 18 y + 7 x , -6 y - 12 z , -x - 4 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 2, 2, 5/6, 5/6, 1/3, 1/2, 1/2, 1/6, 6, 10, 10, 2, 2, 2, 2, 2/3, 2/3, 1/3, 1/3, 1/3, 1/6, 2, 2, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=113.1MB, alloc=56.3MB, time=1.92 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321870 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [-12 - 17 x, -8 x - 2 z, -4 x - 19 y] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-7 x z + 12 y , x + 9 y z, 4 + 8 y] > Problem := [F,G]; 2 Problem := [[-12 - 17 x, -8 x - 2 z, -4 x - 19 y], 2 2 [-7 x z + 12 y , x + 9 y z, 4 + 8 y]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.6MB, alloc=32.3MB, time=0.47 memory used=47.9MB, alloc=32.3MB, time=0.78 memory used=68.8MB, alloc=56.3MB, time=1.14 memory used=110.9MB, alloc=60.3MB, time=1.88 memory used=149.0MB, alloc=84.3MB, time=2.67 N1 := 1067 > GB := Basis(F, plex(op(vars))); GB := [17 x + 12, 5491 y + 576, 17 z - 48] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=202.9MB, alloc=84.3MB, time=3.88 memory used=261.6MB, alloc=116.3MB, time=4.88 memory used=341.5MB, alloc=140.3MB, time=6.33 memory used=432.4MB, alloc=164.3MB, time=9.39 N2 := 1817 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := 2 2 2 [-12 - 17 x, -8 x - 2 z, -4 x - 19 y, -7 x z + 12 y , 9 z y + x , 4 + 8 y] > J:=[op(GB),op(G)]; 2 2 J := [17 x + 12, 5491 y + 576, 17 z - 48, -7 x z + 12 y , 9 z y + x , 4 + 8 y] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 9, 2, 2, 2, 1, 5/6, 2/3, 1/2, 5/12, 1/3, 1/4, 6, 10, 8, 2, 2, 2, 1, 1/2, 2/3, 1/2, 1/4, 1/3, 1/4, 2, 1, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=464.8MB, alloc=164.3MB, time=10.40 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321881 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [12 z - 12 z, -5, -2 - 18 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 2 G := [12 y + 15 x, -8 y + 4 z , -10 y - 15 z] > Problem := [F,G]; Problem := 2 2 2 2 [[12 z - 12 z, -5, -2 - 18 x], [12 y + 15 x, -8 y + 4 z , -10 y - 15 z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.18 memory used=26.0MB, alloc=32.3MB, time=0.49 memory used=49.4MB, alloc=32.3MB, time=0.90 memory used=68.3MB, alloc=56.3MB, time=1.24 memory used=107.2MB, alloc=56.3MB, time=2.31 N1 := 1025 > GB := Basis(F, plex(op(vars))); GB := [1] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); N2 := 79 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Input concluded false after GB computation" > > H:=[op(F),op(G)]; 2 2 2 2 H := [12 z - 12 z, -5, -2 - 18 x, 12 y + 15 x, -8 y + 4 z , -10 y - 15 z] > J:=[op(GB),op(G)]; 2 2 2 J := [1, 12 y + 15 x, -8 y + 4 z , -10 y - 15 z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 8, 8, 2, 1, 2, 2, 1/3, 1/2, 1/2, 2/11, 3/11, 4/11, 4, 6, 5, 2, 1, 2, 2, 1/4, 3/4, 1/2, 1/7, 3/7, 2/7, 2, 3, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=121.6MB, alloc=56.3MB, time=2.57 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321884 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 F := [2 x z - 9, 18 x y + 16 x z, 10 x - 9 z] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; 2 2 G := [-11 x + 6 x y, -15 x y - 17 x, -10 x - 19] > Problem := [F,G]; 2 Problem := [[2 x z - 9, 18 x y + 16 x z, 10 x - 9 z], 2 2 [-11 x + 6 x y, -15 x y - 17 x, -10 x - 19]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.17 memory used=26.2MB, alloc=32.3MB, time=0.47 memory used=48.4MB, alloc=32.3MB, time=0.82 memory used=68.4MB, alloc=56.3MB, time=1.18 N1 := 753 > GB := Basis(F, plex(op(vars))); 3 2 2 GB := [20 x - 81, 80 x + 81 y, -10 x + 9 z] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=109.9MB, alloc=56.3MB, time=2.06 N2 := 243 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; 2 2 H := [2 z x - 9, 18 x y + 16 x z, 10 x - 9 z, -11 x + 6 x y, -15 x y - 17 x, 2 -10 x - 19] > J:=[op(GB),op(G)]; 3 2 2 2 J := [20 x - 81, 80 x + 81 y, -10 x + 9 z, -11 x + 6 x y, -15 x y - 17 x, 2 -10 x - 19] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 12, 12, 2, 2, 1, 1, 1, 1/2, 1/2, 3/4, 1/4, 1/4, 6, 10, 13, 3, 3, 1, 1, 1, 1/2, 1/6, 2/3, 1/4, 1/12, 2, -1, -1] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=136.4MB, alloc=56.3MB, time=2.48 |\^/| Maple 17 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2013 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > restart: > randomize(); 1428321886 > libname := "/Library/Frameworks/Maple.framework/Versions/17", libname: > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > F := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; F := [-14 y z - 19 z, -5 x - 20 z, -4 x z - 13 x] > G := [ randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)), > randpoly([x,y,z], terms=2, degree=2, coeffs=rand(-20 .. 20)) > ]; G := [-13 - 18 x, -19 y - 2 z, -2 x z] > Problem := [F,G]; Problem := [[-14 y z - 19 z, -5 x - 20 z, -4 x z - 13 x], [-13 - 18 x, -19 y - 2 z, -2 x z]] > with(RegularChains): with(SemiAlgebraicSetTools): with(Groebner): > vars := [z,y,x]; R:=PolynomialRing(vars): vars := [z, y, x] > cad1 := CylindricalAlgebraicDecompose( [op(F), op(G)], R, output=list): N1 := nops(cad1); memory used=4.3MB, alloc=32.3MB, time=0.16 memory used=26.6MB, alloc=32.3MB, time=0.49 memory used=47.7MB, alloc=56.3MB, time=0.85 N1 := 597 > GB := Basis(F, plex(op(vars))); 2 GB := [x - 13 x, 14 x y + 19 x, 4 z + x] > cad2 := CylindricalAlgebraicDecompose( [op(GB), op(G)], R, output=list): N2 := nops(cad2); memory used=87.8MB, alloc=56.3MB, time=1.56 N2 := 369 #save(Problem, "format.txt"); > if (GB=[1]) then > print ("Input concluded false after GB computation") > else > print ("Nothing found") > end if: "Nothing found" > > H:=[op(F),op(G)]; H := [ -14 y z - 19 z, -5 x - 20 z, -4 x z - 13 x, -13 - 18 x, -19 y - 2 z, -2 x z ] > J:=[op(GB),op(G)]; 2 J := [x - 13 x, 14 x y + 19 x, 4 z + x, -13 - 18 x, -19 y - 2 z, -2 x z] > > NoOfPolysWithVar:=proc(H,v) > local tot,f: > tot := 0: > for f in H do > if degree(f,v)>0 then > tot := tot+1; > end if: > end do: > return tot: > end proc: > > NoOfMonosWithVar:=proc(H,v) > local tot,f,m: > tot := 0: > for f in H do > for m in f do > if degree(m,v)>0 then > tot := tot+1; > end if: > end do: > end do: > return tot: > end proc: > > NoOfPossMonosD:=proc(deg,vars) > local tot,n,l,T,v: > tot := 0: > n:=nops(vars): > > l:=[seq(i,i=0..deg)]: > T:=combinat:-cartprod([seq(l,i=1..n)]): > > while not T[finished] do > v := T[nextvalue](): > if (add(i,i in v)=deg) then > tot := tot + 1: > end if: > end do: > > return tot: > end proc: > > NoOfPossMonos:=proc(deg,vars) > local tot,i: > tot:=0: > for i from 0 to deg do > tot := tot + NoOfPossMonosD(i,vars): > end do: > return tot: > end proc: > #TNoI := proc(F::list(polynom)) #local f: #return( add( nops(indets(f)), f in F)); #end proc: > > > FeatureComputation:=proc(H,vars) > local Features: > > Features:=[]: > > #Number of Input Polys > Features := [op(Features), nops(H)]: > > #TNoI > Features := [op(Features), add( nops(indets(f)), f in H)]: > > #sotd > Features := [op(Features), add( degree(f), f in H)]: > > #Max Total Degree > Features := [op(Features), max(seq(degree(f),f in H))]: > > #Max Degree in x > Features := [op(Features), max(seq(degree(f,x),f in H))]: > > #Max Degree in y > Features := [op(Features), max(seq(degree(f,y),f in H))]: > > #Max Degree in z > Features := [op(Features), max(seq(degree(f,z),f in H))]: > > #Proportion of polynomials in which x occurs > Features := [op(Features), NoOfPolysWithVar(H,x)/nops(H)]: > > #Proportion of polynomials in which y occurs > Features := [op(Features), NoOfPolysWithVar(H,y)/nops(H)]: > > #Proportion of polynomials in which z occurs > Features := [op(Features), NoOfPolysWithVar(H,z)/nops(H)]: > > #Max Norm of the polynomials > #Features := [op(Features), max(seq(max({seq(abs(c),c in coeffs(expand(f),vars))}),f in H))]: > > #Proportion of monomials in which x occur > Features := [op(Features), NoOfMonosWithVar(H,x)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,y)/add(nops(f),f in H)]: > > #Proportion of monomials in which certain variables occur > Features := [op(Features), NoOfMonosWithVar(H,z)/add(nops(f),f in H)]: > > return Features: > > end proc: > > BF:=FeatureComputation(H,vars): > AF:=FeatureComputation(J,vars): > > df := [BF[2] - AF[2], BF[3] - AF[3], BF[4] - AF[4]]: > featureList := [op(BF), op(AF), op(df)]; featureList := [6, 11, 9, 2, 1, 1, 1, 2/3, 1/3, 5/6, 5/13, 2/13, 6/13, 6, 10, 9, 2, 2, 1, 1, 5/6, 1/3, 1/2, 7/13, 2/13, 3/13, 1, 0, 0] > save(F, G, cat("ranSet/22", convert(F, string),".txt")); > quit memory used=102.4MB, alloc=56.3MB, time=1.82