Solutions of a system of linear equations

h6ss
Messages
77
Reaction score
9
Hello,

I am working on a hybrid simulation-optimization problem of a hamiltonian cycle in two-dimensional Euclidean space, and have encountered the following problem:

Say I have a system of N linear equations and M unknowns, where M > N, with the following constraints:

1. Every coefficient of every unknown has to be equal to 1;
2. Every unknown appears exactly twice;
3. There are exactly two equations of the form xi + xj = 1;
4. All the other equations are equal to 2;
5. Every equation must have at least 2 unknowns;
6. The unknowns are expected results of a Heaviside step function, therefore they can only take the values 0 or 1.

Also, if you sum all the equations and divide both sides by 2, you get:

\sum_{i=1}^{M} x_{i} = N-1

Therefore, for any solution, there will be exactly (N - 1) 1's and (M - (N - 1)) 0's.

Here is an example of such system where N = 11 and M = 15:

1 = x1 + x4
2 = x2 + x3 + x10
2 = x5 + x3 + x14
2 = x1 + x5 + x6 + x8
2 = x7 + x9 + x11
2 = x9 + x13
2 = x4 + x12 + x13 + x15
2 = x10 + x11
2 = x2 + x8 + x15
2 = x6 + x12
1 = x7 + x14

My question is, how many solutions does a generalized version of this system has?

Is there a fast way to find these solutions? A deterministic algorithm of any kind?

The only programming software I'm good with is R, and I haven't found a way to simulate this on R's platform yet.

Thanks in advance!
 
Last edited:
Physics news on Phys.org
For small size problems, a "brute force" idea would be to do an elimination procedure to express all the variables in terms of ##M-N## "master" variables, and then use trial and error for the ##2^{M-N}## possiible solution sets.

But for your example problem, you get several values direct from the equations and the constraint that the solutions are all 0 or 1:

##x_9 = x_{13} = 1##, ##x_{10} = x_{11} = 1##, ##x_6 = x_{12} = 1##.

Substituting in those values, you get some more values ... is there something general about the structure of the equations that you can exploit here?

A completely different approach would be to add the equations ##x_k(1-x_k) = 0##, ##k = 1\dots M## and throw everything at a nonlinear equation solver. But that might run into problems finding all possible solutions.
 
  • Like
Likes 1 person
AlephZero said:
Substituting in those values, you get some more values ... is there something general about the structure of the equations that you can exploit here?

Most likely there is, and this method would simplify my specific example, but I believe every simulation will have its own unique structure, therefore it will be hard to extrapolate a generalized structure from only a limited number of simulations, wouldn't it? I've tried running thousands of simulations and look for common structure between one and another and I haven't been able to find something interesting yet.

AlephZero said:
A completely different approach would be to add the equations ##x_k(1-x_k) = 0##, ##k = 1\dots M## and throw everything at a nonlinear equation solver. But that might run into problems finding all possible solutions.

That's interesting. It's a pretty accurate method in my opinion, but only to solve a particular system. I'm looking for a method that would solve (or at least attempt to) for fixed but unknown values of M and N.

After some time working on this problem I have started being rather pessimistic about finding all solutions in practice. Some people said that the counting problem is #P-hard and a lattice-point enumeration problem of this kind is probably impossible to solve. How accurate are those claims?

I'm starting to believe that I might be able to do better by exploiting the structure of specific simulations, but I wouldn't know where to start. I'd be interested in suggestions about this if anyone has any idea. Thank you!
 
I'm curious to know what motivated this problem, and specifically, how it is related to the Hamiltonian path/cycle problems?

BiP
 
Bipolarity said:
I'm curious to know what motivated this problem, and specifically, how it is related to the Hamiltonian path/cycle problems?

BiP

For the learning of a neural network, I am trying to find a different method to determine the number of hamiltonian paths between two chosen points in a square lattice.

In this system, each variable corresponds to an edge and each equation illustrates the "behaviour" of the system at every point. Basically, every variable appears exactly twice because every edge connects two points. The starting and ending points are equal to 1 because the operation around them is unidirectional, while all the other equations are equal to 2 because they operate bidirectionally.

More exactly, a two-dimensional finite square lattice is generated to help represent the different paths available from a chosen starting point to a chosen ending point. The paths are hamiltonian because each simulation requires our neural network to visit every point exactly once. In the end, we want to teach the network to take an autonomous and optimized decision according to the number of paths found. A generalized solution for the system would give us an idea of how the network would behave knowing only the starting/ending points, independently of the distance that separates them.
 
I asked online questions about Proposition 2.1.1: The answer I got is the following: I have some questions about the answer I got. When the person answering says: ##1.## Is the map ##\mathfrak{q}\mapsto \mathfrak{q} A _\mathfrak{p}## from ##A\setminus \mathfrak{p}\to A_\mathfrak{p}##? But I don't understand what the author meant for the rest of the sentence in mathematical notation: ##2.## In the next statement where the author says: How is ##A\to...
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...

Similar threads

Replies
2
Views
204
Replies
0
Views
143
Replies
3
Views
1K
Replies
4
Views
3K
Replies
9
Views
2K
Replies
3
Views
4K
Replies
11
Views
2K
Replies
5
Views
2K
Replies
1
Views
3K
Back
Top