Navigation

Unordered

If a book is mis-shelved the center book will note that one call sign is out-of-sequence and can communicate that to the errant tome. Each book assumes the titles reported to it via NFC are in order on the shelf.

 A B C Z E F G book title
 3 1 2 1 3 1 3 book thickness
 - - - - - - -
 B A A A A C Z -.
 C C B B B Z E  |
   Z Z C C E F  .- Titles within range 
   E E E Z G    |
       F F      |
         G     -'

Below is a summary of the tabulation above:

Title A is able to communicate with titles B,C. Title B is able to communicate with titles A,C,E,Z. Title C is able to communicate with titles A,B,E,Z. Title Z is able to communicate with titles A,B,C,E,F. Title E is able to communicate with titles A,B,C,F,G,Z. Title F is able to communicate with titles C,E,G,Z. Title G is able to communicate with titles E,F,Z.

A asks for a primary list from BC.

Title A then requests neighbor lists from nearby titles B and C. B and C reply by communicating their lists to title A:

 B C 
 - -             
 A A 
 C B 
 Z Z 
 E E 

A then compares its list to B's list:

  A:ABC
  B:ABCEZ

noting that its list is a subset of B's list. No further action is taken.

A then compares its list to C's list:

  A:ABC
  C:ABCEZ

noting that its list is a subset of C's list. No further action is taken.

Title A knows that its list agrees in whole or in part with the lists reported to it by its neighbors. A's list ABC is in agreement with both lists ABCEZ reported by both titles B and C.

B asks for a primary list from ACZE.

 A C Z E
 - - - -
 B A A A
 C B B B
   Z C C
   E E Z
     F F
       G

B then compares its list to A's list:

 B:ABCEZ
 A:ABC

B then compares its list to C's list:

 B:ABCEZ
 C:ABCEZ

B then compares its list to Z's list and finds there are two different sub-lists:

 B:ABCEZ
 Z:ABCEFZ

Z knows B's list is correctly sorted, yet its own list includes another title between E and itself, and it can't be simultaneously in order in both lists, therefore Z has detected an error in sorting. Further, since Z is the title that is both responding with its ordered list, and it itself is one of the titles with which there is a discrepancy in the sort order, Z can identify itself as the title that has been shelved incorrectly, and can flash its red LED.

Another way to look at it is since Z's list is sorted with F in the 5th spot, B's list informs Z that it is out of order.

B talks to E, finds there are two different sub-lists: B:ABCEZ E:ABCEFGZ E knows B's list is correctly sorted, yet its own list includes two other titles FG between B's final two titles EZ.

Another way to look at it is that E's list is sorted with F in the 5th position, while B's list is compared to E's list to identify which title is out of order.

C asks for a primary list from ABZE:

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

 A B Z E
 - - - -
 B A A A
 C C B B
   Z C C
   E E Z
     F F
       G

C asks for a primary list from A: C:ABCEZ ABC

C asks for a primary list from B: C:ABCEZ B:ABCEZ

C asks for a primary list from Z: C:ABCEZ Z:ABCEFZ Z knows C's list is correctly sorted, yet its own list includes another title between E and itself, and it can't be simultaneously in order in both lists, therefore Z has detected an error in sorting.

Another way to look at it is since Z's list is sorted with F in the 5th spot, C's list informs Z that it is out of order.

C asks for a primary list from E: C:ABCEZ E:ABCEFGZ E knows C's list is correctly sorted, yet its own list includes two other titles FG between C's final two titles EZ.

Another way to look at it is that E's list is sorted with F in the 5th position, while C's list is compared to E's list to identify which title is out of order.


Z asks for a primary list from ABCEF:

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

Z asks for a primary list from A: Z:ABCEFZ ABC

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

Z asks for a primary list from B: Z:ABCEFZ B:ABCEZ

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

Z asks for a primary list from C: Z:ABCEFZ C:ABCEZ

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

Z asks for a primary list from E: Z:ABCEFZ E:ABCEFGZ

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G

Z asks for a primary list from F: Z:ABCEFZ F:CEFGZ

 A B C Z E F G
 - - - - - - -
 B A A A A C Z
 C C B B B Z E
   Z Z C C E F
   E E E Z G
       F F
         G