how to find that 8 number puzzle is solvable or not?
This article has an extensive discussion of the solution:

http://www.cs.bham.ac.uk/~mdr/teaching/modules04/java2/TilesSolvability.html

The summary for the 3x3 board is:


  Lay out the board as a 9x1 row (row 1, then row 2, then row 3).  Count the number of inversions (instances of a higher number coming before a lower number on this row).  The board is solvable if and only if the number of inversions is even.


For example, 

8   1   3
2       5
7   6   4


Written as a row is:

8, 1, 3, 2, , 5, 7, 6, 4


The 8 gives 7 inversions, the 1 gives none, the 3 gives 1 inversion, the 2 gives none, the 5 gives 1, the 7 gives 2, and the 6 gives 1.  This example has a total of 12 inversions, which is even, so it is solvable.