The Identity Problem is Symmetric

Paul Brown @ 2005-01-07T18:58:15Z

Not so long ago, I used an ATM ("automated teller machine", called other things by people in other parts of the world) just down the street from our condo in Chicago. According to the bank's fraud detection folks, that ATM has been used for a good amount of suspicious activity, so they suspended my ATM card. Then, the next morning, they called to badger my wife about it:

Bank: Hello, this is Bank X. We need to speak to Mr. Brown.
Mrs. Brown: He's not here, but I'm his wife. How can I help you?
Bank: Please give us your husband's social security number for verification purposes.
Mrs. Brown: No. How about you prove to me who you are first?

And that went around in circles for a few iterations, ending in stalemate. My wife was right, and I'm not just saying that... The caller supposedly from our bank could have been anyone who might have guessed the name of our bank and decided to phish by phone.

Phishing and other phorms of phraud have highlighted that fact that identity is a symmetric problem while most solutions are one-sided. So, how about, for every account that a user has with a provider, both the user and the provider have the means to authenticate each other? A naive solution could be as simple as having two passwords -- one to give and one to receive.

(comment bubbles) 0 comments

One Step Approach to Getting Stuff Done

Paul Brown @ 2005-01-02T18:19:00Z

An entry on Boing Boing has a link to an animated version of an anti-pattern in productivity. This reminds me of some advice I got from a friend over a decade ago...

Sometime in early 1993, it was around 4AM, and I was in a room heated by a herd of humming SUN 3/50's with another graduate student. (That room was on the 8th floor in the building where vi was written...) He was finishing his dissertation, and I was preparing for my qualifying exams. In conversation, I asked how he got started on his line of research. His response was simple and succinct:

The only way to get something done is to do it.

A tautology at first glance, this is the only solution to the preparation/refinement conundrum. As an argument against premature optimization, creating and experimenting with a prototype often supplies information that was previously unavailable, so many a posteriori conclusions could not have been drawn a priori anyway.

One suggestion along these lines is that cat makes a perfectly good text editor if you're suffering from writer's block. Simply:

pbpbook$ cat - >> work.txt
Type.
Do not backspace; do not edit a line.
Hit enter frequently.
Do not exit until the thought has been expressed.^C

In extreme cases of refine-itis, even a simple text editor can be too tempting.

(comment bubbles) 0 comments

BPEL Adoption Thermometer

Paul Brown @ 2004-12-31T11:07:00Z

John Evdemon (one of the OASIS WS-BPEL TC co-chairs) posted a pointer to an informal survey on Web Services Pipeline. When he posted around two weeks ago, the "What's BPEL?" percentage was an even 50%, and even now, it's only down to 40% with 28% of the respondents saying that they have a BPEL implementation in-house and 23% planning to implement. A little more information about the sample would be interesting, e.g., which BPEL products (FiveSight, Microsoft, IBM, Oracle, ActiveBPEL, Twister, etc.), which BPEL versions (1.0, 1.1, pre-2.0), how many processes, what size and type of organization, etc., but it's still an interesting thermometer.

If you're looking for information about BPEL, take John's advice and go straight to the source. If you're looking for vendors, you can find a list of the people who've been shaping and refining the specification. "Prospective member" means that they're relatively new; "member" means that they've been around for a while, and the 33 founding members are listed in the proposal.

(comment bubbles) 0 comments

Prevayler, Festivus, and Holiday Whup-Ass

Paul Brown @ 2004-12-27T11:02:49Z

Mike Spille opened a can of Holiday whup-ass for Prevayler. (For old-timers, that's pronounced "batch with restart"...) Given the airing of grievances, maybe Mike is celebrating Festivus, complete with wrestling... I have a few grievances of my own, but I haven't had the time to write them up.

Products and projects should have a simple, objective statement of their functionality and target use cases, and lacking that, they deserve scrutiny and scorn, even on Christmas. This sort of thing needs to happen more often, and it can be -- but seldom is -- accomplished without eviscerating the subject. (In this case, there was already a Prevayler "thread" going over on Ward's wiki.) Hopefully, in the end, discussion and exploration root out the kernel of truth and value for all, and sanity reigns.

For open source projects with digestible code bases, it's reasonable for a suitably inclined individual to sit down and make a critique of the architecture and implementation. But what about more complex projects or commercial products and industry specifications? It's technically not an industry analyst's job to rain down scorn on deserving software vendors, but with consolidation running through the IT analysis industry and many analysts deriving a substantial portion of their revenues from vendors, who's out there to keep vendors honest or make meaningful comparisons? For the vendors, is it better to take the high road or to stoop to the lowest level of marketing among competitors?

(comment bubbles) 0 comments

SnipSnap Overload Corrected

Paul Brown @ 2004-12-19T21:55:54Z

Thanks to some helpful suggestions from "leo" (aka Matthias), an upgrade to the latest 1.0b2-uttoxeter version from 0.5.2a appears to have cured the system load behavior for the SnipSnap that hosts the old pbblog. With SnipSnap 0.5.2a running against a 1.4.2_04 JDK on Debian 3, the load on the server would regularly spike up over 4 and almost never dip below 1 and sporadically segfault, so something was definitely wrong. Now that the cache is built, the server with the SnipSnap 1.0b2-uttoxeter instance is humming along at a much happier 0.08.

(comment bubbles) 0 comments

GAP, Bad Shuffle, and Playing with Permutations

Paul Brown @ 2004-12-15T17:50:50Z

crazybob pointed me to a discussion from MaryMaryQuiteContrary's blog related to an unfair random permutation generator:

import java.util.Random;
public class Puzz {
    private static Random rnd = new Random();    
    public static void shuffle(Object[] a) {
        for (int i = 0; i < a.length; i++)
            swap(a, i, rnd.nextInt(a.length));
    }
    private static void swap(Object[] a, int i, int j) {
        Object tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
    }
}

The unfairness, as the discussion points out, should be obvious, because there are n! permutations and nn equally-likely possible outputs from the shuffle method. (n! does not divide nn unless n=2.)

One can naturally wonder just how unfair the shuffle method is. For example, how often does it produce the identity permutation? Somewhat out of nostalgia, this is just the kind of thing that I love to spend (i.e., waste) a little time on.

The first thing to do is to work some examples. For this kind of thing, there is a programming language called GAP, complete with an interactive shell, for working with permutations -- along with finite and infinite groups, rings, algebras, vector spaces, and combinatorial structures. (I used GAP and some other packages extensively for my PhD dissertation, and it definitely beat implementing the classic algorithms by hand...) One of the useful things about GAP is that it treats permutations and permutation groups as first-class constructs:

gap> (1,2,3)(4,5) * (4,5,6,7)(1,2);
(2,3)(4,6,7);
gap> g := SymmetricGroup(7);;
gap> s := Centralizer(g,Subgroup(g,[(1,2,3,4,5)]));
Group([ (6,7), (1,2,3,4,5) ])
gap> Size(s);
10

And this makes it relatively straightforward (if a bit brutish) to compute the probability that shuffle produces a trivial permutation:

gap> twocycleorid := function(i,j,n)
>      if i=j then return Identity(SymmetricGroup(n));
>      else return (i,j);
>    end;
function ( i, j, n ) ... end
gap> f := function(n)                                                 
>      local x,s;                               
>      s := [];
>      for i in Tuples([1..n],n) do                        
>        x := Identity(SymmetricGroup(n));
>        for j in [1..n] do                                
>          x := x * twocycleorid(j,i[j],n);
>         od;
>         if x = Identity(SymmetricGroup(n)) then Add(s,i);fi;
>      od;
>      return s;
>    end;
function( n ) ... end
gap>List([2..7], x -> Size(f(x)));
[ 2, 4, 10, 26, 76, 232]

GAP is a very useful tool, but silicon isn't as good as carbon for this sort of thing -- doing anything meaningful with a O(nn) computation will require (wo)man as opposed to machine. Even so, GAP and its ilk can still be useful as substitutes for hand computation when performing experiments. The key, of course, is to use the computer to do things some combination of faster, more accurately, or with more data than you could be hand; I do believe that the skills to compute by hand are the source of the intuition that creates assertions worth testing by machine... In regards to the current problem, consider the following simple obervation for n=7, which is the largest practical value for n on my PowerBook:

gap> g := function(x,y)
>      return x and y;
>     end;
gap> Iterated(List(f(7), x->Iterated(List(x, y-> y=x[x[y]]),g)),g);
true

The same holds for smaller values of n, which would lead one to ask whether every n-tuple that produces the identity permutation also is an involution. By involution I mean that if you were to have, e.g., the sequence of random indices 1, 5, 4, 3, 2 in shuffle, then you would have the permutation defined as:

1 -> 1
2 -> 5
3 -> 4
4 -> 3
5 -> 2

This is an involution, and as expected, (25)(34)(43)(52) (which is what shuffle produces) is the identity permutation. Conveniently, there is a well-known formula for the number of involutions on an n-element set, so the assertion would be that the number of times that the trivial permutation occurs is defined by the formula:

w(1) = 1
w(2) = 2
w(n) = w(n-1) + (n-1) w(n-2)

I don't have any jobs or backpacks to give away, but I'll invite any budding combinatorialists out there to prove the assertion about involutions. (It's not that bad.) If you think you have a proof (or counterexample), drop a comment here, and I'll let you know if it's right or wrong.

(comment bubbles) 0 comments

Orchestration Patterns

Paul Brown @ 2004-12-14T08:39:00Z

Dragos Manolescu's orchestration patterns site now has draft content on-line and an RSS feed. Dragos is taking a high-level pattern-oriented view of orchestration, including runtime, design-time, management, and philosophical considerations. Orchestration, as services from services, will pick up speed as a prerequisite for reuse and recombination in service-oriented architecture, so I'm looking forward to seeing this body of work evolve and expand. (I might even find the time to contribute a pattern or two.)

Note that Dragos's work on orchestration patterns is not to be confused with the work of Wil Van Der Aalst on so-called "workflow patterns" (which would be more correctly called control-flow patterns). Wil's work takes an internal view of control-flow in process description languages with an eye to classifying existing languages (like BPEL) and finding a triple point where the expressiveness and efficiency of process description languages is simultaneously maximized.

(comment bubbles) 0 comments

All Posts contains 399 items in 57 pages of 7 items each:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57