🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #120

Re: Algorithm to find which bits set.

#120
From: Jonathan Thornburg
Date: Tue, 28 Jul 1992 01:51
20 lines
1470 bytes
In article <1992Jul26.013041.10387@infonode.ingr.com>
aaronb@suhana.analog.ingr.com writes:
>My friend asked me the fastest way of finding which bits are
>set in a bit-string.  I gave him my first response.  But I think there
>is a better way of doing it.

There are quite a few -- this problem has been studied a lot.
Any good book on combinatorial algorithms should cover the various
algorithms.  For example, see

	Reingold, Neiversgelt [sp?], and Deo
	"Combinatorial Algorithms: Theory and Practice"

which describes several of them, and gives references to the original
literature for further details.

- Jonathan Thornburg
  <jonathan@einstein.ph.utexas.edu> or <jonathan@hermes.chpc.utexas.edu>
  University of Texas at Austin / Physics Dept / Center for Relativity
  and (for a few more months) U of British Columbia / {Astronomy,Physics}
Technical Details
Message-ID: <1992Jul28.015139.18916@chpc.utexas.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!jonathan
References: <1992Jul26.013041.10387@infonode.ingr.com>

Show Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!jonathan
From: jonathan@chpc.utexas.edu (Jonathan Thornburg)
Subject: Re: Algorithm to find which bits set.
Message-ID: <1992Jul28.015139.18916@chpc.utexas.edu>
Summary: there a number of "fast" algorithms, see any good combinarial algs book
Keywords: Bit counting
Sender: jonathan@einstein.ph.utexas.edu (Jonathan Thornburg)
Organization: U of Texas at Austin / Physics Dept / Center for Relativity
References: <1992Jul26.013041.10387@infonode.ingr.com>
Date: Tue, 28 Jul 92 01:51:39 GMT
Lines: 20