All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
There is something missing (Posted on 2005-05-13) Difficulty: 3 of 5
This popular Japanese number puzzle has just one easy rule: In every Row, every Column and every 3x3 sub-grid, all the numbers from 1 to 9 should appear, but only once in each row, column and sub-grid.
+------+-------+------+
| 0 0 0 | 7 0 0 | 4 0 0 |
| 0 3 0 | 0 9 0 | 0 2 0 |
| 4 0 0 | 0 0 5 | 0 0 0 |
+------+-------+------+
| 0 0 8 | 0 0 0 | 0 0 5 |
| 0 9 0 | 0 3 0 | 0 7 0 |
| 6 0 0 | 0 0 0 | 3 0 0 |
+------+-------+------+
| 0 0 0 | 4 0 0 | 0 0 6 |
| 0 7 0 | 0 2 0 | 0 9 0 |
| 0 0 5 | 0 0 8 | 0 0 0 |
+------+-------+------+

Replace the 0's with the digits required to satisfy the rule.

See The Solution Submitted by Hugo    
Rating: 4.4000 (10 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Haley's Comet vrs. Penny's Loafer: And the winner is.... | Comment 11 of 29 |
(In reply to re: Thanks, Mr. Haley by Ken Haley)

Haley's Comet !!

Mr. Haley:

The reason my program was taking several minutes to run is that it tries to find all solutions, whereas yours stops at the first one. When I ran both programs to display time-of-day, my program took 0.06 seconds to find the first solution; whereas yours, being much smaller and more efficient, took 0.00 seconds. (Hard to improve on zero seconds.) [I have a 2.20 gigahertz Intel Pentium 4 with 638 Megabytes Installed Memory.]

Thanks for illustrating a much smarter programming technique than just what I have been doing up to now: creating massive redundant code.  

 

 

 

 

 

Edited on May 15, 2005, 6:02 am
  Posted by Penny on 2005-05-15 05:44:29

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information