My Erdős Number is 5

Posted by Kurt on March 15th, 2009

For fun, I calculated my Erdős number tonight (using the AMS Collaboration Distance Calculator).  Your Erdős number represents the number of hops between you and the famous Hungarian mathematician Paul Erdős (where a link is established between two authors when they have collaborated on an academic paper together).  It was created as a joke to approximate your importance in the mathematical community. Erdős was assigned a number of 0.  Each of Erdős’ collaborators were assigned a number of 1, their collaborators were assigned a number of 2, and so forth.  The shortest path I could find between Erdős and myself was of length 5:

  1. Paul Erdős and Paul C. Kainen
  2. Paul C. Kainen and Vladik Ya. Kreinovich
  3. Vladik Ya. Kreinovich and Hung Trung Nguyen
  4. Hung Trung Nguyen and Leonid K. Reznik
  5. Leonid K. Reznik and Kurt Alfred Kluever (via IEEE Sensors 2007)

I also found a couple of length 6 paths with interesting researchers (bolded below) in them:

  1. Paul Erdős and Dieter Kratsch
  2. Dieter Kratsch and Jitender S. Deogun
  3. Jitender S. Deogun and Shashank K. Mehta
  4. Shashank K. Mehta and George Nagy
  5. George Nagy and Richard Zanibbi
  6. Richard Zanibbi and Kurt Alfred Kluever (via IEEE WNYIP 2008)
  1. Paul Erdős and Andrew M. Odlyzko
  2. Andrew M. Odlyzko and Colin L. Mallows
  3. Colin L. Mallows and Henry S. Baird
  4. Henry S. Baird and Dorothea Blostein
  5. Dorothea Blostein and Richard Zanibbi
  6. Richard Zanibbi and Kurt Alfred Kluever (via IEEE WNYIP 2008)

An interesting article here states that “the median Erdős number is 5; the mean is 4.65, and the standard deviation is 1.21.”

Here are some great links for more reading about this topic:

Data structure for weighted sampling

Posted by Kurt on March 9th, 2009

I was asked the following question: Design a data structure that supports 2 operations:

  • insert(element, weight)
  • sample()

When you insert an element into the data structure, you specify a weight. This weight divided by the total of the other weights in the data structure, is the probability that the item is returned when sample() is invoked. You should design your data structure with both speed and space in mind.

Here is a good solution. The insert() operation requires O(1) constant amortized time and the sample() operation requires O(lg n) time due to binary search. The space requirements is O(n) as well.

public final class BinarySearchWeightedSampler<E> {
  private final List<E> elements;
  private final List<Double> weights;

  public BinarySearchWeightedSampler() {
    this.elements = new ArrayList<E>();
    this.weights = new ArrayList<Double>();
  }

  public void insert(E element, double weight) {
      elements.add(element);
      if (weights.isEmpty()) weights.add(weight);
      else weights.add(weight + weights.get(weights.size() - 1));
  }

  public E sample() {
    return elements.get(
        binarySearch(Math.random(), 0, weights.size() - 1,
                     weights.get(weights.size() - 1)));
  }

  private int binarySearch(double val, int low, int high,
      double totalWeight) {
    if (high < low) return low;
    int mid = low + ((high - low) / 2);
    int midValue = weights.get(mid) / totalWeight;
    if (midValue > val)
      return binarySearch(val, low, mid - 1, totalWeight);
    else if (midValue < val)
      return binarySearch(val, mid + 1, high, totalWeight);
    else
      return mid;
  }
}

If we ignore the space requirements and assume the weights have finite precision (I chose integers for clarity, but any finite precision number can be made to work), we can sample in O(1) constant time:

public final class DiscreteWeightedSampler<E> {
  private final List<E> elements;

  public DiscreteWeightedSampler() {
    this.elements = new ArrayList<E>();
  }

  public void insert(E element, int weight) {
    for (int i = 0; i < weight; ++i) {
      elements.add(element);
    }
  }

  public E sample() {
    return elements.get((int) (Math.random() * elements.size()));
  }
}

CS Department’s “5 Minutes with Kurt”

Posted by Kurt on March 8th, 2009

You knew you were headed for a career in Computer Science when…
I witnessed the thrill and the excitement of the dot com boom in the late 90’s.

What is your favorite class and why?
Theory of Computer Algorithms. This course is the first formal, in-depth course on algorithms, complexity, and data structures. These three components are the foundations of Computer Science and I highly recommend that everyone take this course (although it is a very difficult course).

One piece of advice I have for 1st year students is…
Establish a relationship with your professors by asking questions in class and utilizing office hours when you are confused.

If you could have dinner with a famous computer scientist, living or dead, who would you choose?
Luis von Ahn. His work on CAPTCHAs and human computation has inspired me to pursue it as my thesis topic.

What is the most interesting project you have worked on, either in a course or on the job?
The most interesting project I’ve worked on has been my thesis. Reading all of the existing research has helped me develop a brand new idea that nobody else in the world has worked on.

Where do you see yourself in ten years?
Hopefully back in school earning my PhD in Computer Science.

Original post: http://www.cs.rit.edu/about/profiles/Kurt_Kluever
PDF version: http://www.cs.rit.edu/five_minutes/pdf/Kurt_Kluever.pdf

Also check out 5 Minutes with Richard Zanibbi (my thesis advisor) and 5 Minutes with Brian Renzenbrink (a good friend).


Modified version of Webby Blue
Copyright © 2008 kloover.com. All rights reserved.
**This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.**