% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % File: creeping.dtr % % Purpose: capture integer similarity with a creeping Gray code % % Author: Gerald Gazdar, August 1994 % % Email: geraldg@cogs.sussex.ac.uk % % Address: COGS, Sussex University, Brighton BN1 9QH, UK % % Related files: graycode.dtr % % Version: 1.0 % % % % Copyright (c) University of Sussex 1994. All rights reserved. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % Gray codes are a (family of) number representations that have the % interesting (and possibly useful) property that N and N+1 will always % differ by exactly one bit. % Creeping Gray codes are elegant and intuitive -- but verbose. Whilst only % five bits are required to represent 0-9, fifty bits are required to % represent 0-99. Their use in default inheritance networks is thus % probably best restricted to fairly gross scalar distinctions (e.g., % those found in a tone system). Zero: <> == 0 == "" "" "" "" "" . One: <> == Zero == 1. Two: <> == One == 1. Three: <> == Two == 1. Four: <> == Three == 1. Five: <> == Four == 1. Six: <> == Five == 0. Seven: <> == Six == 0. Eight: <> == Seven == 0. Nine: <> == Eight == 0. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % Some example theorems: % % Zero: = 0 0 0 0 0. % One: = 0 0 0 0 1. % Two: = 0 0 0 1 1. % Three: = 0 0 1 1 1. % Four: = 0 1 1 1 1. % Five: = 1 1 1 1 1. % Six: = 1 1 1 1 0. % Seven: = 1 1 1 0 0. % Eight: = 1 1 0 0 0. % Nine: = 1 0 0 0 0. % % Note how the sequence of 1s creeps in at one end of the representation % and exits at the other end. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % # show . % The next line is the Revision Control System Id: do not delete it. % $Id: archive.dtr,v 1.1 1997/04/09 20:40:33 root Exp $