Click here to Skip to main content
14,690,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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

Can someone please help me with it?

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
Comments
Richard MacCutchan 22-Oct-20 4:08am
   
Exactly what help do you need?

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[^]
   
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:
Can someone please help me with it?

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)




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