The second property a good heuristic function should have is that it should be consistent, which means that it should be non-decreasing:
For example, the heuristic function for node 3 should be greater than (or equal to) the heuristic function for node 2, and the value of the heuristic function for node 4 should be greater than (or equal to) the value of the heuristic function for node 2. Let's look at why this is so, through the following diagram:
Let's suppose that nodes 1 and 2 are intermediate nodes, ...