Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:48:07+00:00 2026-05-24T02:48:07+00:00

Can someone explain how the Count Sketch Algorithm works? I still can’t figure out

  • 0

Can someone explain how the Count Sketch Algorithm works? I still can’t figure out how hashes are used, for example. I have a hard time understanding this paper.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:48:08+00:00Added an answer on May 24, 2026 at 2:48 am

    This streaming algorithm instantiates the following framework.

    1. Find a randomized streaming algorithm whose output (as a random variable) has the desired expectation but usually high variance (i.e., noise).

    2. To reduce the variance/noise, run many independent copies in parallel and combine their outputs.

    Usually 1 is more interesting than 2. This algorithm’s 2 actually is somewhat nonstandard, but I’m going to talk about 1 only.

    Suppose we’re processing the input

    a b c a b a .
    

    With three counters, there’s no need to hash.

    a: 3, b: 2, c: 1
    

    Let’s suppose however that we have just one. There are eight possible functions h : {a, b, c} -> {+1, -1}. Here is a table of the outcomes.

     h  |
    abc |  X = counter
    ----+--------------
    +++ | +3 +2 +1 =  6
    ++- | +3 +2 -1 =  4
    +-- | +3 -2 -1 =  0
    +-+ | +3 -2 +1 =  2
    --+ | -3 -2 +1 = -4
    --- | -3 -2 -1 = -6
    -+- | -3 +2 -1 = -2
    -++ | -3 +2 +1 =  0
    

    Now we can calculate expectations

                (6 + 4 + 0 + 2) - (-4 + -6 + -2 + 0)
    E[h(a) X] = ------------------------------------ = 24/8 = 3
                                 8
    
                (6 + 4 + -2 + 0) - (0 + 2 + -4 + -6)
    E[h(b) X] = ------------------------------------ = 16/8 = 2
                                 8
    
                (6 + 2 + -4 + 0) - (4 + 0 + -6 + -2)
    E[h(c) X] = ------------------------------------ =  8/8 = 1 .
                                 8
    

    What’s going on here? For a, say, we can decompose X = Y + Z, where Y is the change in the sum for the as, and Z is the sum for the non-as. By the linearity of expectation, we have

    E[h(a) X] = E[h(a) Y] + E[h(a) Z] .
    

    E[h(a) Y] is a sum with a term for each occurrence of a that is h(a)^2 = 1, so E[h(a) Y] is the number of occurrences of a. The other term E[h(a) Z] is zero; even given h(a), each other hash value is equally likely to be plus or minus one and so contributes zero in expectation.

    In fact, the hash function doesn’t need to be uniform random, and good thing: there would be no way to store it. It suffices for the hash function to be pairwise independent (any two particular hash values are independent). For our simple example, a random choice of the following four functions suffices.

    abc
    
    +++
    +--
    -+-
    --+
    

    I’ll leave the new calculations to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain why there is the need to add an out or in
Can someone explain how MapReduce works with Cassandra .6? I've read through the word
can someone explain to me why [tweets count]; is equal to 1 please? the
Can someone explain why the last line prints out -1? It happens when copy
Can someone explain the mechanics of a jump table and why is would be
Can someone explain to me the advantages of using an IOC container over simply
Can someone explain this result to me. The first test succeeds but the second
Can someone explain what exactly the string 0 but true means in Perl? As
Can someone explain what are the benefits of using the @import syntax comparing to
Can someone explain how to use if-then statements and for loops in Makefiles? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.