A block is defined as group of 9 cells likeBlock B1 consists of cells11 12 1321 22 2331 32 33

Update Rule for Possible values of cell

Possible values for a cell is calculated by removing actual value that is present in other cells in that particular row, column and block from list of possible values of the cell.

If a value is present in a row/column/block then it should not appear in any other cell in the same row/column/block.

For example, for cell 22, possible value is calculated by removing actual values of all cells in row R2, column C2 and Block B1 from Varray 1..9(all possible values)

Update Rule for Actual Value of a cell1.Cell containing only one possible value.2.Value possible only in one cell in a row, column and block

Pseudo Code

For all cellsCheck If actual value is null thencheck list of possible value for cell. If only one value possible, then update cell with this value.For all values 1..9 check if the value is not possible in other cells of that particular row column or block then update cell with that value.

Friday, May 25, 2012

Two senior persons, SP1, working since long time in the Organization, along with SP2, recently joined, organizes freshers induction program.

After praising number of process, practices and policies SP1 now talks about resource allocation system.

SP1 addressing freshers: Our Resource allocation system is one of the best. It is very advanced, and well proven system. The allocation of resources to particular project is done on the basis of number of critetias like their skills, experience, aspirations, personal constraints and, many others.It tries to find the best match for particular project.

After the session finished, SP2 with suprise and amazement says to SP1 ‘I didn’t know we have such a powerful resource allocation system’

when var value is 1 thenboth second and third decode returns null, and evaluates to false for all rows, and first decode returns 10. The where clause translates into something likewhere deptno = 10 or deptno = null or deptno = nullSo, it returns deptno 10 employees only.