Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!gatech!hubcap!dinucci
From: dinucci@ogcvax.UUCP (David C. DiNucci)
Newsgroups: comp.hypercube
Subject: Re: T or routing question
Message-ID: <311@hubcap.UUCP>
Date: Thu, 16-Jul-87 09:20:01 EDT
Article-I.D.: hubcap.311
Posted: Thu Jul 16 09:20:01 1987
Date-Received: Sat, 18-Jul-87 06:42:46 EDT
Sender: fpst@hubcap.UUCP
Lines: 36
Approved: hypercube@hubcap.clemson.edu
Summary: Obvious speedup to earlier posting

In article  I write:
>In article  gdburns@TCGOULD.TN.CORNELL.EDU (Greg Burns) writes:
>>000 001 011 010 110 111 101 100
>>
>>Given only a bit code difference (src exclusive or dest) we all know how
>>to route on a hypercube.  But how do you determine the route on the above
>>loop?
>
>  . . .
>
>Any solution that doesn't require message passing will beat this
>for setup speed, but I don't know about simplicity.

Message passing can be eliminated easily by just "simulating" the
cube on each node.  This can be done by using something like the
following:  (Unlike the previous alg, this one is untested though
nearly identical)
   dest = 0;
   count = 0;
   do {
     ++count;
     me = dest;
     dest = me ^ (count & -count);
   } while (me != mynode)
   if (count == cubesize) dest = 0;
   /* dest now contains ptr to next guy in the ring */

The previous algorithm is missing the special-case "if" at the end.

Sorry for wasting so much bandwidth on a personal solution to a
problem which has likely been solved by uncountable others (and
probably better).
-- 
Dave DiNucci                    UUCP:  ..ucbvax!tektronix!ogcvax!dinucci
Oregon Graduate Center          CSNET: dinucci@Oregon-Grad.csnet
Beaverton, Oregon