Skip to content

kalvotom/ChristensenSet.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChristensenSet.jl

A computation of Christensen sets in Julia.

Build Status codecov


What is Christensen's set?

Let us consider a finite set of complex numbers K and a positive integer n. Then the Christensen set C(K, n) is the set of all roots of univariate polynomials with coefficients from K and degree at most n. It is a subset of the complex plane and it is easy to visualize its density.

The following picture shows all roots of polynomials with coefficients 1 or -1 and degree at most 25 (there are 3 221 224 897 of them). Further images can be found in the Gallery.

alt text

This Julia package is motivated by the John Baez's article and Dan Christensen's experiments. It employs the PolynomialRoots.jl package for root finding.

Installation

At the moment the package can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add "https://github.com/kalvotom/ChristensenSet.jl.git"

Example Usage

The following code evaluated in Jupyter notebook plots all roots of polynomials with coefficients -1 or 1 and degree at most 10

polynomials = PolynomialIterator([-1.0, 1.0], 10)
image = RootsImage(-2.0-2.0im, 2.0+2.0im, 500, 500)
find_roots!(polynomials, image);

plot(image)

Other examples can be found in the gallery directory.

Questions and Contributions

If you have any questions or suggestions please create an Issue or Pull request.