Giter Site home page Giter Site logo

parallelsudoku's Introduction

parallelSudoku

##A parallel backtracking algorithm to solve a sudoku puzzle

###About The module is based on solving a sudoku puzzle using a randomized parallel algorithm which is based on the following paper - "Randomized Parallel Algorithms for Backtrack Search and Branch-and-Bound Computation" by RICHARD M. KARP and YANJUN ZHANG.

The module is a parallel program for hybrid systems i.e, mutli-core systems in a cluster. This requried the use of 2 libraries - pthread(within a node parallelism) and OpenMPI(cluster level parallelism).

The design of the algorithm was modified for the hybrid systems, though the overall idea is as described in the paper mentioned above. The code for the knight's tour problem (similar to solving sudoku) mentioned in the design has not been uploaded.

For detailed description of the module, view the design document provided above. The design is based on Foster's design methodology for designing parallel algorithms.

###Setup

  1. Run the make command on the command prompt.
  2. The files s1.txt, s2.txt and s3.txt contain sample sudoku puzzles. [0s in the text file represent missing values; s1 and s2 are 9x9 puzzles, s3 is a 16x16 puzzle]
  3. The file name is mentioned in line number 422 of psudoku.c [Sorry for the hard-coding, you can change it]
  4. How to run - [This might depend on your cluster configuration also]
    mpirun -n 4 ./psudoku [Will update the exact format for various possibilities later].

A similar algorithm can be developed for other backtracking search problems by necessary modifications. Examples? - The knight's tour problem, solving a prolog query, and many more.

parallelsudoku's People

Contributors

pkj415 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.