0
   

Prolog

 
 
Reply Fri 4 Jan, 2013 05:04 pm
De fine the predicate region/4 such that region(+M,+K,+Size,?L) is satis ed if L is the list of all elements of region number K of the sudoku grid of size Size represented by matrix M. We recall that a sudoku grid of base n is represented by a square matrix of size n2. We consider here that regions are numbered from left to right, and top to bottom. In a sudoku grid of base 3, region 1
would be the one if the top-left corner, with regions 2 and 3 to its right, and region 4 . A region is always a sub grid of size n  n. One can compute the coordinates of the top-left element of a region using operators div and mod.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 575 • Replies: 0
No top replies

 
 

 
  1. Forums
  2. » Prolog
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/18/2024 at 07:42:29