title: Adjacent Pixels differ by more than 2, possible assignments of grey levels of two adjacent pixels out of 64 possible combinations?
body: <h1>I recently came across following question, and I am not sure if I understand the question to solve it. Can someone here possibly help me understand it?</h1>
  
  <p>A black and white computer graphics display is divided int an array of pixels.
  Each of the pixels can take on one of eight gray levels ranging from 0 to 7. 
  In order to prevent sharp discontinuities of shade, the system enforces the rule that,the gray levels of adjacent pixels cannot differ by more than 2. 
  How many of the 64 possible assignments of grey levels of two adjacent pixels satisfy the rule?</p>
  
  <p>Possible answers:    </p>
  
  <ul>
  <li>24  </li>
  <li>32</li>
  <li>34</li>
  <li>40</li>
  <li>64</li>
  </ul>
  
  <p>I wish to understand the basics of solving this problem. :)
  Any pointers are highly appreciated.</p>