Git Product home page Git Product logo

Comments (7)

sumiya11 avatar sumiya11 commented on May 27, 2024 1

@aabouman The simplest solution would be to compute the basis incrementally, starting from the basis of [f1,f2], then [f1,f2,f3], and so on:

groebner([f1...fn]) = groebner(groebner(groebner([f1, f2]), f3)... fn)

Something like

julia> function iterativegroebner(system)
           gb = [system[1]]
           for i in 2:length(system)
               push!(gb, system[i])
               @info "$i/$(length(system)) step"
               @time gb = Groebner.groebner(gb)
           end
           gb
       end

Which produces

# system noon with 8 polynomials
julia> system = Groebner.change_ordering(Groebner.noonn(8), :degrevlex)

julia> iterativegroebner(system);
[ Info: 2/8 step
  0.000816 seconds (2.15 k allocations: 940.922 KiB)
[ Info: 3/8 step
  0.002860 seconds (14.05 k allocations: 2.932 MiB)
[ Info: 4/8 step
  0.016764 seconds (64.50 k allocations: 8.450 MiB)
[ Info: 5/8 step
  0.085297 seconds (262.17 k allocations: 30.699 MiB)
[ Info: 6/8 step
  0.543022 seconds (1.18 M allocations: 151.607 MiB, 5.17% gc time)
# e.g., stop somewhere here, when the time goes up
[ Info: 7/8 step
  3.378745 seconds (4.55 M allocations: 644.938 MiB, 10.05% gc time)
[ Info: 8/8 step
 13.478732 seconds (13.13 M allocations: 1.904 GiB, 5.44% gc time)

This will be slower in general, but allows you to stop earlier, when the time on the current step becomes too large

julia> @time groebner(system);
  9.691641 seconds (11.32 M allocations: 1.458 GiB, 6.46% gc time)

julia> iterativegroebner(system) == groebner(system)
  true

Other than that, F4 is not very suitable for tracking the progress, since the computation times can (and usually will) blow up unexpectedly. I will think about it though

from groebner.jl.

aabouman avatar aabouman commented on May 27, 2024 1

That's funny I had hacked together something similar where I just added additional polynomials bit by bit. Thanks so much for your help!

from groebner.jl.

sumiya11 avatar sumiya11 commented on May 27, 2024

This and #8 are top priority

from groebner.jl.

aabouman avatar aabouman commented on May 27, 2024

I don't have much knowledge of the f4 algorithm but do you have a recommendation for a quick way to measure progress? I just want to get a feel for when the problem becomes infeasible.

from groebner.jl.

sumiya11 avatar sumiya11 commented on May 27, 2024

Do you mean some kind of progress bar ?

from groebner.jl.

aabouman avatar aabouman commented on May 27, 2024

Yeah it doesn't need to be that advanced but just somewhere I can print an iterator or something of the like to understand the progress

from groebner.jl.

sumiya11 avatar sumiya11 commented on May 27, 2024

That's a cool idea! Ive never heard anyone doing that with Groebner bases before; I'll investigate what can be done 😄

from groebner.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.