Message Boards Message Boards

Is there a way to give Solve "hints" ...

Solve is a wonder, but in my current application is seems to be "slow", relatively.

I'm finding positive integer solutions to constraints that are sums (of positive integers) and minimums (of positive integers).

When I use pencil and paper to get a solution I sort the constraints and apply them in a certain - data driven - order. I'm thinking my manual solution runs in time that is linear in the number of constraints. However, programming this approach would be tedious - which is why it's wonderful to have Solve.

I've tried telling Solve that the solution desired is in Integers, but this just makes it run more slowly.

Am I missing something in my use of Solve?

POSTED BY: Mark Tuttle
4 Replies
POSTED BY: Mark Tuttle

You may wish to not use Solve at all but use the constraints to eliminate cases that aren't satisfied, in a sequential manner, alternatively generating cases and eliminating most of them with the constraints. I've done Sudoku and KenKen that way in Mathematica, problems too large for Solve or Reduce to handle.

POSTED BY: Frank Kampas
POSTED BY: Mark Tuttle

I don't think you can Solve hints. You can break the problem down into parts and use Solve repeatedly. I've done that Reduce.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract