14,732,620 members
1.00/5 (1 vote)
See more:
I want to write a C program which can solve Cryptarithmatic Problem such as the one shown below using Using Forward Checking :

SEND
+ MORE
---------
MONEY

What I have tried:

I know the basic concepts regarding Constraint Satisfaction problems and Forward checking. And I tried to go through the internet searching for a way to initiate the implementation but could not.
Posted
Updated 22-Oct-20 0:34am
Richard MacCutchan 22-Oct-20 4:08am

Exactly what help do you need?

## Solution 1

We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]

## Solution 2

Quote:
I know the basic concepts regarding Constraint Satisfaction problems and Forward checking. And I tried to go through the internet searching for a way to initiate the implementation but could not.

As programmer, there is a point where you will have to start creating solutions to problems.
For beginners, internet is useful mainly because homework is based on very simple problems and thousand of students have already solved, so it is not complicated to find solutions of others.
As you advance in programming, problem become less and less classical and solutions become more and more difficult to find on internet. This is when you have to start creating your own solutions.
Quote:
artificial-intelligence

I fear artificial-intelligence will need more force than a simple brute force solution.
Quote:

My advice: solve the problem by hand, and then create a solution using brute force.
The only smart rule I see is that S and M are not 0.
The way you deduced that M is 1 may be more complicated to translate to code.

For evenings of winter:
- Learn one or more analyze methods, E.W. Djikstra/N. Wirth Stepwize Refinement/top-Down method is a good start.
Structured Programming.pdf[^]
https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design[^]
https://en.wikipedia.org/wiki/Structured_programming[^]
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra[^]
https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF[^]
Program Development by Stepwise Refinement[^]
- Learn Algorithms and Data-Structures.
GitHub - The-Art-of-Computer-Programming-Books: "Everyday life is like programming, I guess. If you love something you can put beauty into it." ? Donald E. Knuth[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Top Experts
Last 24hrsThis month
 Richard Deeming 125 OriginalGriff 90 Maciej Los 75 Sandeep Mewara 60 Patrice T 60
 OriginalGriff 2,740 Richard MacCutchan 1,270 CPallini 1,030 thatraja 665 Maciej Los 637

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900