public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/32822]  New: More Hash Document Errors
@ 2007-07-19 14:22 chalathip at gmail dot com
  2007-07-19 19:53 ` [Bug libstdc++/32822] More pb_ds/hash_based_containers.html errors pcarlini at suse dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chalathip at gmail dot com @ 2007-07-19 14:22 UTC (permalink / raw)
  To: gcc-bugs

+++ This bug was initially created as a clone of Bug #32819 +++

from libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html
In the Bug #32819, I report 2 errors. But I found one more bug.

Section : Hash Table Design - Hash Policies - Ranged-Hash Functions

Original text :
Now assume that s is the string representation of a of a long DNA sequence (and
so S = {'A', 'C', 'G', 'T'}). In this case, scanning the entire string might be
prohibitively expensive. A possible alternative might be to use only the first
k characters of the string, where
k^|S| ≥ m               ---------- (1)
...
requiring scanning over only 
k = log4( m )           ---------- (2)
characters.

My suggestion:
In my humble opinion, I think that the first equation should be changed to
|S|^k ≥ m
Otherwise, the second equation should be changed to
k=m^(1/4)

Anyway if the form of the second equation is changed from
k = xxx
to
k = integral_ceiling (xxx)
or something looks like
k= [xxx]             ,(but the brackets should have only their upper halves ),
it might be a little more accurate. 

Best regards,
Chalathip Thumkanon.


-- 
           Summary: More Hash Document Errors
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chalathip at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32822


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-19 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-19 14:22 [Bug libstdc++/32822] New: More Hash Document Errors chalathip at gmail dot com
2007-07-19 19:53 ` [Bug libstdc++/32822] More pb_ds/hash_based_containers.html errors pcarlini at suse dot de
2007-09-18 22:49 ` bkoz at gcc dot gnu dot org
2007-09-18 22:50 ` bkoz at gcc dot gnu dot org
2007-09-19 16:59 ` bkoz at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).