Browse by Tags

Tagged Content List
  • Blog Post: GUID guide, part three

    Let's recap: a GUID is a 128 bit integer that is used as a globally unique identifier. GUIDs are not a security system; they do not guarantee uniqueness in a world where hostile parties are deliberately attempting to cause collisions; rather, they provide a cheap and easy way for mutually benign parties...
  • Blog Post: The Solution To The Simple Puzzle

    The first time I ran my histogram visualizer I asked for a Cauchy distribution with a minimum of -10 and a maximum of 10, and of course I got a graph that looks much like the one from my article of last week: Looks perfectly reasonable; I guess my program is correct right out of the gate, because I am...
  • Blog Post: A Simple Puzzle

    My original version of the histogram-generating code that I whipped up for the previous episode of FAIC contained a subtle bug. Can you spot it without going back and reading the corrected code? private static int[] CreateHistogram(IEnumerable<double> data, int buckets, double min, double max)...
  • Blog Post: Generating Random Non-Uniform Data In C#

    When building simulations of real-world phenomena, or when generating test data for algorithms that will be consuming information from the real world, it is often highly desirable to produce pseudo-random data that conform to some nonuniform probability distribution. But perhaps I have already lost some...
  • Blog Post: Big head, long tail

    Here's a graph of the population size of the one hundred largest urban areas in Canada : (Click on the graph for a larger version.) Notice how there is an enormous spiky "head" on this graph: Toronto, Montreal and Vancouver are quite large cities by any measure. Then there is an immediate sharp...
  • Blog Post: Murky Research

    No computers today, but some interesting - and important - math. (And, happy Canada Day, Canadians!) " Car Talk " is a popular weekly phone-in program that has been on National Public Radio for several decades now, in which Bostonian brothers Tom and Ray crack wise and diagnose car (and relationship...
  • Blog Post: Socks, birthdays and hash collisions

    Suppose you’ve got a huge mixed-up pile of white, black, green and red socks, with roughly equal numbers of each. You randomly choose two of them. What is the probability that they are a matched pair? There are sixteen ways of choosing a pair of socks: WW, WB, WG, WR, BW, BB, … Of those sixteen pairs...
  • Blog Post: Long division

    A thing that makes a reader go hmmm is why in C#, int divided by long has a result of long, even though it is clear that when an int is divided by a (nonzero) long, the result always fits into an int. I agree that this is a bit of a head scratcher. After scratching my head for a while, two reasons to...
  • Blog Post: What exactly does 'lifted' mean?

    (Note: all type placeholders S , T , U that I mention in this article are non-nullable value types.) I got a question the other day from a reader who had been taking a close look at the C# 2.0 standard. He noticed that when we talk about nullables in the standard we talk about "lifting", but we do...
  • Blog Post: Every Number Is Special In Its Own Special Way

    I got a question recently about where in the .NET framework the "special numbers" were defined. The questioner was actually asking about the Double.NaN , Double.PositiveInfinity , etc, special values for floating point numbers. Of course there are other "special numbers" defined by the framework, such...
  • Blog Post: Five-Dollar Words for Programmers, Part Two: Orthogonal

    In geometry, "orthogonal" basically means the same thing as "perpendicular", or "at right angles". The walls are orthogonal to the floor. But algebraists extend the meaning of "orthogonal" beyond mere perpendicularity; to an algebraist, two aspects of a system are orthogonal if one can be varied without...
  • Blog Post: Five-Dollar Words for Programmers, Part One: Idempotence

    Programmers, particularly those with a mathematical background, often use words from mathematics when describing their systems. Unfortunately, they also often do so without consideration of the non-mathematical background of their colleagues. I thought I might talk today a bit about the word "idempotent...
  • Blog Post: High-Dimensional Spaces Are Counterintuitive, Part Five

    All of this stuff about high dimensional geometry has been known for quite a while. The novel bit that this paper is all about is how to actually build a fast index for searching a high-dimensional space where the query has a strong likelihood of being junk . The idea that these smart Microsoft researchers...
  • Blog Post: High-Dimensional Spaces Are Counterintuitive, Part Four

    It's reasonably common to have a database containing a few thousand or million points in some high-dimensional space. If you have some "query point" in that space you might like to know whether there is a match in your database. If you're looking for an exact match then the problem is pretty easy --...
  • Blog Post: High-Dimensional Spaces Are Counterintuitive, Part Three

    My next book project is ready for copyediting, the wedding invitations are sent out, my bug count is under control, I've got a layer of levelling compound poured in the basement, there's no more ivy on my roof, and I’m rigging my sailboat some time this week (about six weeks later than I would have liked...
  • Blog Post: High-Dimensional Spaces Are Counterintuitive, Part Two

    The volume of an n-cube of edge length s is easy to work out. A 2-cube has s 2 units of area. A 3-cube has s 3 units of volume. A 4-cube has s 4 units of 4-volume, and so on -- an n-cube has s n units of n-volume. If the n-cube has edge of s>1, say s=2, then clearly the n-volume dramatically increases...
  • Blog Post: High-Dimensional Spaces Are Counterintuitive, Part One

    A friend of mine over in Microsoft Research pointed out to me the other day that high-dimensional spaces are really counterintuitive. He'd just attended a lecture by the research guys who wrote this excellent paper and we were geeking out at a party about it. I found this paper quite eye-opening and...
  • Blog Post: The National Coin Flipping League Championship Series

    No tech today, but a little basic math. In baseball, a sport I know little about, apparently the Boston Red Sox have recently come back from a three game deficit to win a best-of-seven series against their traditional rival team, the New York Yankees. Baseball is a game which attracts statisticians...
Page 1 of 1 (18 items)