Skip to content

duongtruongbinh/Cryptarithmetic-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptarithmetic Problem Solving using CSP

This repository is dedicated to solving cryptarithmetic problems in the realm of Artificial Intelligence, utilizing the Constraint Satisfaction Problem (CSP) methodology. The repository offers solutions to cryptarithmetic puzzles across four distinct levels of increasing complexity, serving to challenge and enhance the problem-solving capabilities of the system.

Levels of Complexity

Level 1: Basic Addition and Subtraction Equations

In this introductory level, the repository addresses elementary addition and subtraction equations involving two operands. The primary objective is to identify variable values that satisfy the provided equation.

Level 2: Equations with Multiple Operands and Single Operator (+/-)

Progressing to a higher level, Level 2 involves equations containing multiple operands combined through addition and subtraction operators. The repository's focus is on deducing values for the variables within equations restricted to addition and subtraction.

Example Problem: SO + MANY + MORE + MEN + SEEM + TO + SAY + THAT + THEY + MAY + SOON + TRY + TO + STAY + AT + HOME + SO + AS + TO + SEE + OR + HEAR + THE + SAME + ONE + MAN + TRY + TO + MEET + THE + TEAM + ON + THE + MOON + AS + HE + HAS + AT + THE + OTHER + TEN = TESTS

The solution to this problem would be TRANHYSMOE = 9876543210.

Level 3: Equations with Multiple Operands and Operators (+/-) with Parentheses

This level introduces equations featuring multiple operands and a mix of addition and subtraction operations. Parentheses are employed to dictate the order of operations. The objective is to ascertain values for the variables that fulfill the equation.

Example Problem: SEND + (MORE + MONEY) - OR + DIE = NUOYI

Potential solutions to this type of problem could be SENDMORYIU = 1369547082, 1658432970, and so on.

Level 4: Multiplication Equations with Two Operands and One Operator (*)

Level 4 amplifies the complexity by incorporating multiplication operations alongside addition and subtraction. The equations at this level consist of two operands and a single multiplication operator. The repository endeavors to identify appropriate variable values to render the equation valid.