Merge branch '1703.09680v1' of git.wmi.amu.edu.pl:kalmar/GroupsWithPropertyT into 1703.09680v1
This commit is contained in:
commit
62aab2d4b8
40
SL.jl
40
SL.jl
@ -23,9 +23,18 @@ function SL_generatingset(n::Int)
|
|||||||
return unique(S), one(G)
|
return unique(S), one(G)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SLsize(n,p)
|
||||||
|
result = 1
|
||||||
|
for k in 0:n-1
|
||||||
|
result *= p^n - p^k
|
||||||
|
end
|
||||||
|
return div(result, p-1)
|
||||||
|
end
|
||||||
|
|
||||||
function SL_generatingset(n::Int, p::Int)
|
function SL_generatingset(n::Int, p::Int)
|
||||||
p == 0 && return SL_generatingset(n)
|
p == 0 && return SL_generatingset(n)
|
||||||
(p > 1 && n > 0) || throw(ArgumentError("Both n and p should be positive integers!"))
|
(p > 1 && n > 0) || throw(ArgumentError("Both n and p should be positive integers!"))
|
||||||
|
println("Size(SL(n,p)) = $(SLsize(n,p))")
|
||||||
F = Nemo.ResidueRing(Nemo.ZZ, p)
|
F = Nemo.ResidueRing(Nemo.ZZ, p)
|
||||||
G = Nemo.MatrixSpace(F, n,n)
|
G = Nemo.MatrixSpace(F, n,n)
|
||||||
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
||||||
@ -45,20 +54,19 @@ function products{T}(U::AbstractVector{T}, V::AbstractVector{T})
|
|||||||
return unique(result)
|
return unique(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ΔandSDPconstraints(Id, S; radius::Int=4)
|
function ΔandSDPconstraints(Id, S, radius)
|
||||||
k = div(radius,2)
|
sizes = Vector{Int}()
|
||||||
lengths = Vector{Int}()
|
|
||||||
S = vcat([Id], S)
|
S = vcat([Id], S)
|
||||||
B = S
|
B = S
|
||||||
push!(lengths,length(B))
|
push!(sizes,length(B))
|
||||||
for i in 2:radius
|
for i in 2:2*radius
|
||||||
B = products(S, B);
|
B = products(S, B);
|
||||||
push!(lengths, length(B))
|
push!(sizes, length(B))
|
||||||
end
|
end
|
||||||
k = div(radius,2)
|
println("Generated balls of sizes $sizes")
|
||||||
basis = B[1:lengths[k]]
|
basis = B[1:sizes[radius]]
|
||||||
|
|
||||||
product_matrix = PropertyT.create_product_matrix(B,lengths[k]);
|
product_matrix = PropertyT.create_product_matrix(B, sizes[radius]);
|
||||||
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B))
|
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B))
|
||||||
L_coeff = PropertyT.splaplacian_coeff(S, basis, length(B));
|
L_coeff = PropertyT.splaplacian_coeff(S, basis, length(B));
|
||||||
Δ = GroupAlgebraElement(L_coeff, product_matrix)
|
Δ = GroupAlgebraElement(L_coeff, product_matrix)
|
||||||
@ -113,6 +121,10 @@ function parse_commandline()
|
|||||||
help = "Matrices over filed of p-elements (default: p=0 => over ZZ)"
|
help = "Matrices over filed of p-elements (default: p=0 => over ZZ)"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 0
|
default = 0
|
||||||
|
"--radius"
|
||||||
|
help = "Find the decomposition over B_r(e,S)"
|
||||||
|
arg_type = Int
|
||||||
|
default = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
return parse_args(s)
|
return parse_args(s)
|
||||||
@ -136,16 +148,22 @@ function main()
|
|||||||
else
|
else
|
||||||
name = "SL$(N)_$p"
|
name = "SL$(N)_$p"
|
||||||
end
|
end
|
||||||
|
radius = parsed_args["radius"]
|
||||||
|
if radius == 0
|
||||||
name = name*"-$(string(upper_bound))"
|
name = name*"-$(string(upper_bound))"
|
||||||
|
radius = 2
|
||||||
|
else
|
||||||
|
name = name*"-$(string(upper_bound))-r=$radius"
|
||||||
|
end
|
||||||
S() = SL_generatingset(N, p)
|
S() = SL_generatingset(N, p)
|
||||||
|
|
||||||
if parsed_args["cpus"] ≠ nothing
|
if parsed_args["cpus"] ≠ nothing
|
||||||
if parsed_args["cpus"] > cpuinfo_physicalcores()
|
if parsed_args["cpus"] > cpuinfo_physicalcores()
|
||||||
warn("Number of specified cores exceeds the physical core cound. Performance will suffer.")
|
warn("Number of specified cores exceeds the physical core cound. Performance will suffer.")
|
||||||
end
|
end
|
||||||
Blas.set_num_threads(parsed_args["cpus"])
|
BLAS.set_num_threads(parsed_args["cpus"])
|
||||||
end
|
end
|
||||||
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol)
|
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol, radius)
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user