jeanluct / cbraid Goto Github PK
View Code? Open in Web Editor NEWcbraid/braiding are C++ libraries for computations on braid groups
License: GNU General Public License v3.0
cbraid/braiding are C++ libraries for computations on braid groups
License: GNU General Public License v3.0
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
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.
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.
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)
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
.
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);
}
Hi there, is this project Linux only? I don't immediately see any releases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.