topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 9:03 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: software request: display all possible solutions  (Read 3551 times)

Arthur Menu

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 28
    • View Profile
    • Donate to Member
software request: display all possible solutions
« on: April 14, 2018, 03:04 PM »
I have discovered KenKen puzzles and enjoy them a lot  but the more complex puzzles (9 x 9 grid) require a lot of time to solve. It would help if there were an app that would show all the possible integer solutions to an equation using only the integers 1 to 9.

For example, if I input the equation x+y+z=10,
the app would give the following results:
7,2,1
5,4,1
6,3,1
6,2,2
8,1,1
5,3,2
4,4,2
(Just doing the math in my head, may have missed a possible solution.)

If I input x*y*z=12,
the app would give:
6,2,1
4,3,1

Any takers? Or if such an app already exists, please point me to it.
-- Arthur

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,640
    • View Profile
    • Donate to Member
Re: software request: display all possible solutions
« Reply #1 on: April 15, 2018, 12:20 AM »
Online version: KenKen and Kendoku calculator

If I input x*y*z=12,
the app would give:
6,2,1
4,3,1

2018-04-15 15_21_51-KenKen and Kendoku calculator, Killer Sudoku and Kakuro calculator.png

Results:
Code: Text [Select]
  1. 12* =====
  2. 3*2*2
  3. 4*3*1
  4. 6*2*1
  5. ---------

Arthur Menu

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 28
    • View Profile
    • Donate to Member
Re: software request: display all possible solutions
« Reply #2 on: April 15, 2018, 02:36 AM »
Thank you, 4WD! Perhaps you enjoy doing kenkens too!
-- Arthur

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: software request: display all possible solutions
« Reply #3 on: April 15, 2018, 02:45 AM »
As a side note, I recently experimented with the GO programming langauges and wrote a program to help make puzzles of a similar (but different form): For example, given the numbers [2, 3, 6, 15] find a mathematical expression that uses all of the numbers and reaches the target value of 7.

You can see my code here: https://www.donation....msg368923#msg368923

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,640
    • View Profile
    • Donate to Member
Re: software request: display all possible solutions
« Reply #4 on: April 15, 2018, 02:47 AM »
Thank you, 4WD! Perhaps you enjoy doing kenkens too!

Never knew they existed until you mentioned them.

If you want to get into Python there's some code on StackOverflow that deals with finding multiplication cases, you may be able to contact the original poster and ask if he has posted his solutions for addition, subtraction, and division somewhere.

There's also a lot of software on GitHub.