Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Games

    Fast Sudoku Solver

    download button


    Downloads: 754  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.9/5)
    18 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Michael Kleder | More scripts
    www.mathworks.com
    Freeware 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    Matlab
    August 16th, 2007, 09:49 GMT
    C: \ Games

     Read user reviews (0)  Refer to a friend  Subscribe

    Fast Sudoku Solver description

    Fast Sudoku Solver - Rapidly finds all possible solutions to a sudoku puzzle

    SUDOKU - rapidly find all possible solutions to a sudoku puzzle

    Usage: Mout = sudoku(M)

    M = intial sudoku matrix, with zeros for empty entries
    Mout = solution as a 9x9 matrix if there is a unique solution, or as a 9x9xN matrix if there are N solutions

    Notes:
    (1) The algorithm employs recursion, but does as much as it can with straighforward deterministic deduction at each recursion level to increase overall speed.
    (2) Supplying this function with an empty or overly sparse input matrix can create longer calulation times as the function searches for all possible solutions.
    (3) A "No solution" error is generated if the input puzzle has no valid solution.
    (4) Tested but no warranty, use at your own risk.
    (5) Michael Kleder, December 2006

    Examples:

    % find the unique solution to this puzzle in a fraction of a second:
    M = [0 0 8 0 9 0 5 0 0;0 0 1 0 7 0 4 0 0;0 0 4 0 3 0 6 0 0;
    0 1 0 0 0 6 0 0 7;0 9 0 0 0 3 0 0 0;0 2 0 0 5 0 0 6 0;
    0 5 0 0 4 0 0 2 0;0 0 0 8 0 0 0 3 0;6 0 0 1 0 0 0 4 0];
    sudoku(M)

    % find the 100 possible solutions to this puzzle in few seconds:
    M = [0 0 8 0 9 0 5 0 0;0 0 1 0 7 0 0 0 0;0 0 4 0 3 0 6 0 0;
    0 1 0 0 0 0 0 0 7;0 9 0 0 0 3 0 0 0;0 2 0 0 5 0 0 6 0;
    0 5 0 0 4 0 0 2 0;0 0 0 8 0 0 0 3 0;0 0 0 1 0 0 0 4 0];
    tic;M=sudoku(M);toc;size(M,3)

    Requirements:

    · MATLAB Release: R14SP3



    TAGS:

    Fast Sudoku | Sudoku Solver | matlab games | Fast | Sudoku | Solver

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM