Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Created October 2, 2013 20:46
Show Gist options
  • Save cupakromer/6800292 to your computer and use it in GitHub Desktop.
Save cupakromer/6800292 to your computer and use it in GitHub Desktop.
Mathz is hard

Problem

Setup

Given a one-way function h(vi) => hi mapping visitors to unique anonymous tokens, for a set of visitors, v0, v1, ..., vn ∈ V, over a time period T, where t0, t1, ..., tm ∈ T are discreet units. Determine how many unique hi are in a subset of T: d ⊂ T, assuming you have a mapping l(hi) => tj of hi to the last tj it was seen at.

Issue

Given the above with mapping ∀ ti ∈ T to ui, calculate the new unique count for a period of k・d.

Example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment