Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1130

Re: n bits on of m bits

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!.POSTED!not-for-mail
From Willem <willem@toad.stack.nl>
Newsgroups comp.theory, comp.programming, sci.math
Subject Re: n bits on of m bits
Date Tue, 20 Dec 2011 16:00:37 +0000 (UTC)
Organization Stack Usenet News Service
Lines 23
Message-ID <slrnjf1c95.2tib.willem@toad.stack.nl> (permalink)
References <4344a25e-7fd5-43c5-b43a-a004c9f5f2ad@y7g2000vbe.googlegroups.com> <9l9q13F2g7U1@mid.individual.net> <jcoeou$777$2@odin.sdf-eu.org> <8RPHq.28946$8O1.13912@newsfe07.iad> <slrnjf0nfh.r2q.willem@toad.stack.nl> <5M6dnXNqI40qO23TnZ2dnUVZ_q6dnZ2d@earthlink.com> <89eab275-fd81-42fb-8f66-2e8a5d089ca7@x7g2000yqb.googlegroups.com>
NNTP-Posting-Host toad.stack.nl
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace mud.stack.nl 1324396837 29479 2001:610:1108:5010::135 (20 Dec 2011 16:00:37 GMT)
X-Complaints-To abuse@stack.nl
NNTP-Posting-Date Tue, 20 Dec 2011 16:00:37 +0000 (UTC)
User-Agent slrn/0.9.9p1 (FreeBSD)
Xref x330-a1.tempe.blueboxinc.net comp.theory:1493 comp.programming:1130

Cross-posted to 3 groups.

Show key headers only | View raw


Dave wrote:
) On Dec 20, 9:16?am, Patricia Shanahan <p...@acm.org> wrote:
)> If the input is narrow enough to fit in an hardware data type that has
)> fast addition, bit operations, and shifts, counting the one bits only
)> takes log(w) steps, where w is the width in bits, not the value of the
)> input number.
)
) The code I posted in http://groups.google.com/group/sci.math/msg/cb1e398f74688e66
) steps from one number with n bits set directly to the next one, so the
) loop count is mCn.

Making the same assumption about hardware data types as above, of course.

But that goes for the complexity of just about all algorithms out there, really.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

n bits on of m bits Andrew Tomazos <andrew@tomazos.com> - 2011-12-17 08:05 -0800
  Re: n bits on of m bits Robert Wessel <robertwessel2@yahoo.com> - 2011-12-17 10:44 -0600
  Re: n bits on of m bits Dave <dave_and_darla@Juno.com> - 2011-12-17 08:56 -0800
  Re: n bits on of m bits richard@cogsci.ed.ac.uk (Richard Tobin) - 2011-12-17 17:22 +0000
  Re: n bits on of m bits "BartC" <bc@freeuk.com> - 2011-12-17 18:23 +0000
    Re: n bits on of m bits Andrew Tomazos <andrew@tomazos.com> - 2011-12-17 11:05 -0800
  Re: n bits on of m bits Robert Wessel <robertwessel2@yahoo.com> - 2011-12-17 13:24 -0600
    Re: n bits on of m bits Robert Wessel <robertwessel2@yahoo.com> - 2011-12-17 13:47 -0600
  Re: n bits on of m bits blp@cs.stanford.edu (Ben Pfaff) - 2011-12-17 11:28 -0800
  Re: n bits on of m bits "The Last Danish Pastry" <clivet@gmail.com> - 2011-12-19 21:52 +0000
    Re: n bits on of m bits kym@kymhorsell.com - 2011-12-19 22:44 +0000
      Re: n bits on of m bits Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-19 15:33 -0800
        Re: n bits on of m bits kym@kymhorsell.com - 2011-12-20 03:51 +0000
        Re: n bits on of m bits Willem <willem@toad.stack.nl> - 2011-12-20 10:05 +0000
          Re: n bits on of m bits Patricia Shanahan <pats@acm.org> - 2011-12-20 07:16 -0800
            Re: n bits on of m bits Dave <dave_and_darla@Juno.com> - 2011-12-20 07:29 -0800
              Re: n bits on of m bits Willem <willem@toad.stack.nl> - 2011-12-20 16:00 +0000
      Re: n bits on of m bits The Last Danish Pastry <clivet@gmail.com> - 2011-12-19 16:41 -0800
        Re: n bits on of m bits kym@kymhorsell.com - 2011-12-20 04:29 +0000
  Re: n bits on of m bits kym@kymhorsell.com - 2011-12-20 19:04 +0000
  Re: n bits on of m bits Robin Vowels <robin.vowels@gmail.com> - 2011-12-22 07:25 -0800
    Re: n bits on of m bits Willem <willem@toad.stack.nl> - 2011-12-22 15:58 +0000
      Re: n bits on of m bits Robin Vowels <robin.vowels@gmail.com> - 2011-12-22 16:26 -0800
        Re: n bits on of m bits Willem <willem@toad.stack.nl> - 2011-12-23 18:58 +0000
          Re: n bits on of m bits Robin Vowels <robin.vowels@gmail.com> - 2011-12-25 04:01 -0800
            Re: n bits on of m bits Dave <dave_and_darla@Juno.com> - 2011-12-25 09:22 -0800
  Re: n bits on of m bits Dr J R Stockton <reply1151@merlyn.demon.co.uk> - 2011-12-24 23:36 +0000
  Re: n bits on of m bits "io_x" <a@b.c.invalid> - 2011-12-31 16:32 +0100

csiph-web