Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 995 Bytes

File metadata and controls

17 lines (15 loc) · 995 Bytes

Cryptarithm-Puzzle-Solver-Using-DFS-and-A-star-Algorithm

Overview

This jupyter notebook provides a solution for cryptarithmetic puzzles using two different approaches: Depth-First Search (DFS) and A* Search Algorithm. Cryptarithm puzzles are mathematical puzzles where the digits are replaced by letters of the alphabet, and each letter represents a unique digit. The objective is to find the digit corresponding to each letter to satisfy the given arithmetic equation.

Features

Cryptarithmetic Puzzle Solver using DFS Algorithm:

Provides a method to solve puzzles by exploring all possible mappings of letters to digits in a depth-first manner.

Cryptarithmetic Puzzle Solver using A Algorithm*:

Utilizes a heuristic-driven approach to efficiently explore possible mappings and find a solution.

Evaluation and Printing:

Includes functionality to evaluate and print the solution in a human-readable format.

Dependencies

  • Python
  • jupyter notebook
  • heapq
  • itertools