Giter Site home page Giter Site logo

cbraid's Issues

Confusing

If someone wanted to use this as a protocol for encrypted communications, they'd never figure out how to do that without a humongous computer science background

Bug in sliding circuit set

From Bert Wiest: there seems to be a bug in the Sliding Circuit Set computation:

Choose an option: (type '?' for help) t

Set the number of strands: 6

Type a braid with 6 strands: ('6' = Delta)

3 2 1

Type the name of the output file: foo.txt

Error in MinCS.

Source files still mention GPLv2

Hi, it looks like the intention (a long time ago) was to switch to the GPLv3+ license. However, the headers of the individual files in the project still mention the GPLv2. If the goal is to adopt v3, then you should update those header comments so that someone can't take their code under the GPLv2.

ultra summit set segfaults

Bug uncovered by Bert Wiest.

--------------------------------------------------------
----------------  This is Braiding 1.0  ----------------
--------------------------------------------------------
-----|  Copyright (C) 2004 Juan Gonzalez-Meneses  |-----
-----| Braiding comes with ABSOLUTELY NO WARRANTY |-----
-----|           This is free software            |-----
-----| See GNU General Public License in GPL.txt  |-----
--------------------------------------------------------

l: Left Normal Form          r: Right Normal Form       

p: Permutation               x: Crossing numbers        

v: Least Common Multiple     ^: Greatest Common Divisor 

s: Super Summit Set          z: Centralizer             

e: Conjugacy Test            u: Ultra Summit Set        

t: Set of Sliding Circuits   a: Ask for Powers (On/Off)   

q: Quit             

--------------------------------------------------------

Choose an option: (type '?' for help) u

Set the number of strands: 6

Type a braid with 6 strands: ('6' = Delta)

2 1 3 2 1 4 3 2 5 4 3 2 1 1 4

Type the name of the output file: foo.txt

Segmentation fault (core dumped)

Randomize() for BandBraid is not correct.

Issue:

Randomization for band braids does not work, because of an error in BallotSequence (cbraid.cpp).
BallotSequence currently isn't injective, and may segfault.
This is caused by an off-by-one error in recursive calls to BallotSequence.

Suggested fix:

void BallotSequence(sint16 n, cln::cl_I k, sint8 *s) {
    sint16 i;
    cln::cl_I r;

    if (k <= (r = GetCatalanNumber(n - 1) * GetCatalanNumber(0)))
        i = 1;
    else if (k > (r = GetCatalanNumber(n) - r)) {
        i = n;
        k = k - r;
    }
    else {
        for (i = 1; i <= n; ++i) {
            if (k <= (r = GetCatalanNumber(i - 1) * GetCatalanNumber(n - i)))
                break;
            else
                k = k - r;
        }
    }

    cln::cl_I_div_t d = cln::floor2(k - 1, GetCatalanNumber(n - i));
    s[1] = 1;
    s[2 * i] = -1;
    if (i > 1)
        BallotSequence(i - 1, d.quotient + 1, s + 1);
    if (i < n)
        BallotSequence(n - i, d.remainder + 1, s + 2 * i);
}

Is this Linux only?

Hi there, is this project Linux only? I don't immediately see any releases.

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.