avoiding-collinearity

Code and tests for determining an upper bound on the number of collinear points in an infinite walk on a finite set of vectors in Z^3.

https://github.com/finnlidbetter/avoiding-collinearity

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

combinatorics computational-geometry
Last synced: 6 months ago · JSON representation ·

Repository

Code and tests for determining an upper bound on the number of collinear points in an infinite walk on a finite set of vectors in Z^3.

Basic Info
  • Host: GitHub
  • Owner: FinnLidbetter
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 380 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
combinatorics computational-geometry
Created over 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme Citation

README.md

avoiding-collinearity

Code and tests for determining an upper bound on the number of collinear points on an infinite walk on a finite set of vectors in Z^3.

This project is split into two parts. One is a Maven Java project with the bulk of the functionality. The other is a Cargo Rust project with a single, smaller program.

To build the Java project, install Maven from https://maven.apache.org/ and run mvn package from within the maven directory.

To build the Rust project, install Cargo from https://www.rust-lang.org/tools/install and run cargo build from within the cargo directory.

Java project commands

Once the jar file has been built by mvn package a jar file will have been created at maven/target/avoidingcollinearity-1.1.0.jar.

Running java -jar avoidingcollinearity-1.1.0.jar will startup a command line interface with a number of commands available. These commands are described below here with some examples.

Print the first 220 symbols of the sequence of the infinite word generated by the morphism:

PrintSymbolSequence 220 --one-indexed

Get the index of the last new subword of a given length using:

IndexOfLastNewSubword 9

Draw a sequence of trapezoids using:

DrawTrapezoids wholeAndRt3 343 /home/finn/trapezoids.png

Assert a bound on the ratio of largest and smallest distances between trapezoids separated by a minimum and maximum number of indices using:

AssertBoundedDistanceRatio 7 48 wholeAndRt3 9 0

Find the largest count of trapezoids separated by at most a given number of indices that are intersected by a single straight line using:

CountCollinearTrapezoids 7 wholeAndRt3

Get a disjoint set of intervals that contain all subwords of a given length for the symbol sequence:

DistinctSubwordIntervals 343

More usage information for each the com.commands can be found by using the --help option, for example:

PrintSymbolSequence --help

Rust project

The cargo/count-collinear subdirectory contains a Rust program for counting the largest number of collinear points in the first N points of a particular sequence of points. The collinearity_data.csv file contains the result of checking for the largest number of collinear points in the first 10 million terms of the sequence. This used approximately 2.7 years of CPU time spread between AWS Fargate spot instances, my personal laptop, and a PC belonging to my brother, Robin Lidbetter.

The computation showed that there are no 7 collinear points in the first 10 million terms of the sequence.

The computation can be reproduced by running

cargo run --release

and entering

10000000.

Other configurations are available for running this in parallel by splitting it up into many jobs, enqueuing an encoding of those jobs in AWS SQS and reading and processing those jobs, optionally writing the results to AWS DynamoDb.

To prove the weaker claim that there are no 7 collinear points in any 7^5=16807 consecutive terms of the sequence, the command

cargo run --release --bin collinearity16807

can be used. This command takes approximately 95 minutes to run to completion on a 2020 M1 Macbook Air.

Owner

  • Name: Finn Lidbetter
  • Login: FinnLidbetter
  • Kind: user
  • Location: Kitchener, Ontario, Canada
  • Company: RideCo

Senior software engineer on the Algorithms and Optimization team at RideCo. Competitive Programming enthusiast.

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lidbetter"
  given-names: "Thomas Finn"
  orcid: "https://orcid.org/0000-0003-0116-1175"
title: "Avoiding Collinearity"
version: 1.1.0
date-released: 2023-07-18
url: "https://github.com/FinnLidbetter/avoiding-collinearity"

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels