Comments (10)
Hi, there are two possible directions to check:
- Your rand_arg_zp produces arbitrarily random values. This might not be right if there exists constraints between your input variables. For example, an input quaternion q=[u1, u2, u3, u4] should guarantee that norm(q) == 1 on Z_p. See prob_pc_relpose_4pra_sir2__example for an example, if there exists constraints between your input variables.
- If you did not make above mistakes,
Quotient ring basis (degree = 1) B = [ 1 ]
implies that there is probably only one linear solution. The code generation functionality is not adapted to linear systems. But I think you can just comment the assertion. The generator should be able to generate some code and you can modify it manually to extract your solutions.
from gaps.
Hello @prclibo ,
Your rand_arg_zp produces arbitrarily random values. This might not be right if there exists constraints between your input variables.
This is not the case with my input variables in the program whose file I've attached. I also tried giving non-random (integer) values, for which I know there exists a solution, but I encountered the same error.
If you did not make above mistakes, Quotient ring basis (degree = 1) B = [ 1 ] implies that there is probably only one linear solution. The code generation functionality is not adapted to linear systems. But I think you can just comment the assertion.
I think this is indeed the case with my problem, so I will comment out the assertion and see how the resulting solver is.
. The generator should be able to generate some code and you can modify it manually to extract your solutions.
I'm not sure what you mean by manually modifying it. Could you elaborate a bit on this?
from gaps.
Hello @prclibo ,
Your rand_arg_zp produces arbitrarily random values. This might not be right if there exists constraints between your input variables.
This is not the case with my input variables in the program whose file I've attached. I also tried giving non-random (integer) values, for which I know there exists a solution, but I encountered the same error.
You should always generate valid Zp samples (either random or designed) with existing solutions, random invalid samples will mislead the generator.
If you did not make above mistakes, Quotient ring basis (degree = 1) B = [ 1 ] implies that there is probably only one linear solution. The code generation functionality is not adapted to linear systems. But I think you can just comment the assertion.
I think this is indeed the case with my problem, so I will comment out the assertion and see how the resulting solver is.
. The generator should be able to generate some code and you can modify it manually to extract your solutions.
I'm not sure what you mean by manually modifying it. Could you elaborate a bit on this?
You obtain one scheme, corresponding to one unknown variable. The generated code should be able to solve this variable as eigenvalues and you can solve the rest manually.
from gaps.
I also tried giving non-random (integer) values, for which I know there exists a solution,
You should always generate valid Zp samples (either random or designed) with existing solutions, random invalid samples will mislead the generator.
Yes, sorry, what I meant was I gave some integer values, for which I knew the solution.
You obtain one scheme, corresponding to one unknown variable. The generated code should be able to solve this variable as eigenvalues and you can solve the rest manually.
Alright, thank you. I will try this out tomorrow and update here.
from gaps.
@prclibo @hilibo,
I commented out the assertion, and there is some code generated, and it solves for one variable like you said. Is it possible to recover the monomials which correspond to the columns of the C0 matrix? That would help me recover the variables.
from gaps.
The code is written too long time ago. I forgot too much details. I suspect for linear system, the bottom of the last column of C0\C1 might have all the solved unknowns. Could you check it and let me know the result?
from gaps.
C0\C1 does not give me a meaningful result, but I'm able to recover three variables from the last three rows of rref([C0 C1)
, and recover the remaining by backsubstituting in my original equations.
However, this does not work in all cases, and to understand why it would be helpful if I could recover the monomials that the columns of C0
correspond to.
EDIT:
C0\C1 does not give me a meaningful result,
I think was for some degenerate data (row rank deficient C0), because it gives the right solutions usually for C0\-C1
from gaps.
C0\C1 does not give me a meaningful result, but I'm able to recover three variables from the last three rows of
rref([C0 C1)
, and recover the remaining by backsubstituting in my original equations.However, this does not work in all cases, and to understand why it would be helpful if I could recover the monomials that the columns of
C0
correspond to.EDIT:
C0\C1 does not give me a meaningful result,
I think was for some degenerate data (row rank deficient C0), because it gives the right solutions usually for
C0\-C1
Good to know that rref helps. I think it is better to generate a simpler naive linear system to check the generator first as your problem is kinda complex.
In finalize_template.m
, there is a templ.mm
which I think should correspond to the full monomials of [C0, C1]. Please check if you can extract via it.
from gaps.
@rakshith95 does the approach work on your linear system?
from gaps.
Hello, I didn't try extracting the monomials, but I was able to recover the variables from the template, through some trial and error into guessing what the monomials were.
from gaps.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gaps.