Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Solving equations when variables are integers' topicStudent Support Forum > General > Archives > "Solving equations when variables are integers"

Next Comment >Help | Reply To Topic
Author Comment/Response
Mark Neal
08/17/05 03:23am

Letís say I have a set of equations I want to solve.
I use Solve[.] and get a non-unique solution.
Can I restrict the solution values to integer values?
I know it can be done in NMinimise[.] or Minimize[.] For example {p,n,d,q} -Element of- Integers. Alternatively, can I specify that the solution values must come from a set of integers from 1 to 16?

As a backup I guess I could just reformulate my problem to minimise the deviations from equality and then use NMinimise[.] or Minimise[.]. I have a genetic algorithm firing away in the background at the moment (through excel) at the rate of 450,000 trials per hour. Any idea how fast NMinimise is by comparison?
The specific problem Iím working on has 2*10^13 possible combinations.


URL: ,

Subject (listing for 'Solving equations when variables are integers')
Author Date Posted
Solving equations when variables are integers Mark Neal 08/17/05 03:23am
Re: Solving equations when variables are integers Henry Lamb 08/18/05 06:41am
Next Comment >Help | Reply To Topic