pmb

Leave a comment

Comments 14

punkrockgrrrl January 14 2009, 22:59:23 UTC
could you possibly help with a minor python problem?

Reply

pmb January 14 2009, 23:04:31 UTC
Certainly. IM is best for this kind of thing. I am pboothe@gmail.com on gtalk and jongleurpeter and AIM

Reply


purple_dj January 14 2009, 23:20:04 UTC
As my professional career continues, I slowly drift further and further from these sorts of problems. But if you need to know about the day-to-day practicalities of implementing bit-bang protocols, radio controls, frequency hopping, clock synchronization, or anything in that direction, I can certainly help you.

Reply

(The comment has been removed)

purple_dj January 14 2009, 23:46:20 UTC
I'm not worried that I couldn't move back in the algorithms direction, just commenting that I am doing that very little anymore.

I happen to like oscilloscopes and logic analyzers and embedded systems a lot, though. For Christmas I got a pretty cool beginner RC helicopter, which was a cool gift in itself. But some part of the fun for me was in realizing that they had implemented a 2.4GHz DSSS radio with diversity receive (a very difficult feat) in a consumer level product (even more difficult!), and opening it up to see what transceiver chipset they were using. (Cypress WirelessUSB series stuff, if you care, but they had to put two receiver chips in for diversity functionality...)

Reply


(The comment has been removed)

pmb January 15 2009, 00:27:58 UTC
Interesting. I am running Python 2.5 (due to laziness) and I definitely WAS building a giant dict of tuples... hmmm...

Reply


jes5199 January 15 2009, 00:03:58 UTC
are there actually any pale green plusses on that chart? I can't fucking see them.

Reply

kirinn January 15 2009, 00:11:05 UTC
They start lining up with the red n^5.5 line shortly after it passes the blue one. Before that they're under the blue line and pink x's.

Reply

pmb January 15 2009, 00:15:39 UTC
It is true that Gnuplot's default colors are basically the worst choices possible. Fixing this is not easy, and I didn't want to waste more time than I already had.

Also what kirinn said.

Reply

jes5199 January 15 2009, 00:21:17 UTC
actually, blame fucking livejournal.
the chart was truncated on the right side on my view of your entry, with no scrollbar.

Reply


coldtortuga January 15 2009, 21:23:47 UTC
Let D be the input matrix (with annoying 1-based indexing -- which actually turns out to be useful when coding a solution with python). "D" for "Data".

Let C(i,j) = sum_{p=1 to i} sum_{q=1 to j} D(p,q). Note that C is the same size as D. For convenience, also define C(i,0)=C(0,j)=0 (yay zero-based!). "C" for "Corner". Obviously C can be computed in O(N^2).

The sum over the sub-rectangle CartesianProduct((u,v], (x,y]) is C(v,y)-C(u,y)-C(v,x)+C(u,x). This makes more sense when standing on a grid-tiled floor, preferably while sipping tea. Enumerating all rectangles is easy (4 nested for-loops) in O(N^4).

I can has fortran? takes ~30sec in python. I don't yet quite grok the algorithms you posted.

Reply


Leave a comment

Up