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


Groups > comp.programming > #6349

Re: whats good to read on programming

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: whats good to read on programming
Date 2016-03-12 19:59 +0000
Organization A noiseless patient Spider
Message-ID <87r3ffa2mz.fsf@bsb.me.uk> (permalink)
References <81196e67-2d91-4168-9064-dd505f2b358e@googlegroups.com> <874mcbbj8v.fsf@bsb.me.uk> <4ff2abe7-9e40-4107-9d37-f227fab27b43@googlegroups.com>

Show all headers | View raw


fir <profesor.fir@gmail.com> writes:

> W dniu sobota, 12 marca 2016 20:15:30 UTC+1 użytkownik Ben Bacarisse napisał:
<snip>
>> These may seem a bit dated since I read them quite some time ago, but I
>> think my favourite books on programming are the pair of collected CACM
>> columns by Jon Bentely: "Programming Pearls" and "More Programming
>> Pearls".  I see there is a new edition of the first with new
>> material...
>
> well indeed this seems good compact style writting - i readed the
> first piece on counting words
>
> links here
> https://tfetimes.com/wp-content/uploads/2015/04/ProgrammingPearls2nd.pdf
>
> can somebody explain me - is this hashing in c version perfect one? i
> mean it counts with no mistakes? if so why?

The program in the book makes no mistakes because the table does not
rely only on the hash function.

> (i know the idea of
> hashing but its inperfection always keeps me away - is there reliable
> way of perfect hashing on cases like that?

Perfect hashing is a technical term for something rarely seen.  When you
want to do a lot of lookups from a fixed set of keys very fast, you can
construct a function that maps the set of n keys to the numbers 0 to n-1
in such a way that every key maps to a distinct number (i.e. the
function is a bijection).  This is called a perfect hash function.

Normal hashing works by handling the collisions, so the case where two
keys hash to the same value does not produce an error.  There are many
ways to do this.  The Bentley book uses a linked list, I think.

-- 
Ben.

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


Thread

whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 08:58 -0800
  Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 19:15 +0000
    Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 11:36 -0800
      Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 19:59 +0000
        Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 12:07 -0800
          Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 12:19 -0800
            Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 20:26 +0000
              Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 12:32 -0800
          Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 20:23 +0000
    Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 20:05 +0000
      Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 12:13 -0800
      Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 12:29 -0800
      Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-12 22:06 +0000
        Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 15:56 -0800
    Re: whats good to read on programming Kaz Kylheku <330-706-9395@kylheku.com> - 2016-03-13 02:08 +0000
      Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-13 00:10 -0800
        Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-13 00:19 -0800
    Re: whats good to read on programming "Osmium" <r124c4u102@comcast.net> - 2016-03-13 11:24 -0600
      Re: whats good to read on programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-13 23:51 +0000
  Re: whats good to read on programming Mark Carroll <mtbc@bcs.org> - 2016-03-12 19:45 +0000
    Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 11:57 -0800
    Re: whats good to read on programming fir <profesor.fir@gmail.com> - 2016-03-12 11:59 -0800
    Re: whats good to read on programming Robert Wessel <robertwessel2@yahoo.com> - 2016-03-12 14:35 -0600
  Re: whats good to read on programming Randy Howard <rhoward.mx@EverybodyUsesIt.com> - 2016-03-12 14:35 -0600
  Re: whats good to read on programming Jacob Sparre Andersen <sparre@nbi.dk> - 2016-03-13 15:47 +0100

csiph-web