Print Story Espresso, Win-to-Lin, and the Tragic PFC
Diary
By tmoertel (Fri Apr 16, 2004 at 08:08:31 AM EST) (all tags)
Yesterday, I was in Pittsburgh's Strip District, home of the the city's ethnic food markets. Naturally, I stopped into Enrico Biscotti and bought a half dozen coconut macaroons because they are without equal in the land. But, like a damn fool, I didn't buy any biscotti. And I was right there! Now, here I am ready to make espresso. The barren expanse of my espresso cup's saucer mocks me.

Inside: Photo of real espresso, more on the Win2k-to-Linux switch, thoughts on the entries in PFC: Tragic, and a poll on which A-Team member gets the boot in order to make room for the simplex algorithm (keep reading, it will make sense).



A cup of the good stuff

First, here's what a well prepared cup of my favorite beverage looks like:

That's a small cup, and there's probably a little less than 2 oz. in it. For some reason, in the United States, if you order an espresso, the "specialty coffee" chains think that you want a lot of it -- the bigger, the better, right? -- and end up over-extracting the coffee. That's why you almost have to make espresso at home if you want it done right.

Take a look at the cup. It's ugly. It's no collector's edition. But it is thick and heavy and holds the heat. (I also suspect that, if my espresso drinking were interrupted by a brutal criminal having the intent to do me harm, and I was forced to make a hasty defense, the cup could easily become a missile that would drop the bandit like a greased anvil. Something to keep in mind if you're in the market for espresso cups and it comes down to a toss up between these babies and some lightweight, designer-bait cups from Illy.)

Fedora Linux makes a mighty fine desktop

So far, I'm loving Linux on the desktop. When I switched my main workstation from Win2k, I was worried about losing support for add-ons, such as my HP OfficeJet G95 and my Palm Pilot. Happily, I have found my worries to have been unmerited.

The HP OfficeJet Linux driver, which again is already included with FC1, does a darn fine job. Setup was a breeze, and now I'm printing and scanning as usual.

My Palm Pilot syncs with J-Pilot, conveniently part of Fedora Core 1. I just hooked it up and it synced on the first try.

I'm still debating whether to get VMware in order to run my few Win32-only apps.

The PFC wait begins

Now that the submission period for PFC: Tragic has ended, I'll share my thoughts. I was delighted to see entries like edwin's network flow–based approach. Most of us PFC old timers fell too quickly into traditional searches and missed the opportunity to fully explore the interesting attributes of jacob's well-chosen challenge task. Woe unto me that I ever read Korf's survey on searches!

I love edwin's entry. The hardest part of solving problems is not applying the chosen means of solution but rather choosing the best means in the first place. Edwin chose a better means than I and the rest of the searchers did. He also gets bonus points for choosing a means that could be implemented in terms of readily-available libraries. It's a great entry all around. Props to edwin.

I thought it was interesting that celeriac use linear programming, in particular the simplex algorithm, in his solution. I actually gave a talk on the simplex algorithm about ten years ago, but like a fool I didn't see the now-obvious Mr. T connection. Doubtless my talk suffered for it. Props to celeriac for making the simplex algorithm part of the A-Team. (See poll.)

That's why I love PFC. It's fascinating to see what approaches people will choose. I hope that jacob has the time to classify the entries based on their means of solution and to provide commentary on each class. My hunch is that the final ranking will be something like this:

  • network flow
  • linear programming (less efficient)
  • optimized search
  • brute-force search
  • things that don't really work

Jacob has a tricky task ahead. I suspect that some of the search-based solutions will actually perform very well for real-world decks. So the question becomes one of how to balance theoretical and real-world algorithmic efficiency. I'm glad it's not my problem. (Have fun, jacob! Tee hee hee.)

< Mr Abooey, in your honor... | BBC White season: 'Rivers of Blood' >
Espresso, Win-to-Lin, and the Tragic PFC | 9 comments (9 topical, 0 hidden) | Trackback
Mmm, espresso. by i (5.00 / 1) #1 Fri Apr 16, 2004 at 08:44:38 AM EST
I'll go make me a cup.

Of tea, naturally.




The PFC by jacob (5.00 / 1) #2 Fri Apr 16, 2004 at 10:51:48 AM EST
I agree with you 100% about edwin's and many other entries. I was absolutely thrilled to see the huge variety of approaches people took to the challenge; it really surprised me that there were so many of them. I'm going to have my work cut out for me figuring out which of them was the best ...

--



I'm interested in the whole Groebner base thing by edwin (3.00 / 0) #4 Fri Apr 16, 2004 at 01:29:58 PM EST
I'd never even heard of them before so I was fascinated to read the discussion about that. I'll be intrigued to see how well it works. I still don't think I understand how it works, sounds like I need to do some reading...

[ Parent ]

Kontact by Ranieri (5.00 / 1) #3 Fri Apr 16, 2004 at 11:23:46 AM EST
If/When you switch to one of the FC2 pre-releases (or even FC2 when it's released) make sure to check out kontact/kpilot. It's working pretty well for me so far, and has way better integration than jpilot. I had terrible luck trying to get gnome-pilotd to work at all. Crashes all over the place. Too bad, I really like Evolution more than kmail.

So far, I havent found any applications that are worth fussing with VMWare to have. Aside from games, that tend to run lousily in VMWare anyway, most application have a decent native replacement.
Anyway, congrats on the switch ;)



seriously? by dev trash (3.00 / 0) #5 Fri Apr 16, 2004 at 03:55:57 PM EST
To get an application in redhat you have to wait til the next release????

--
Click
[ Parent ]

OK, i'll bite. by Ranieri (3.00 / 0) #6 Sat Apr 17, 2004 at 09:22:54 PM EST
Kontact is, as far as I know, pretty new and not included in pre-KDE3.2 distributions. Whether it's a dependency issue or just plain a release schedule thing, I have no idea.

What you can do is either track down the rpms from 1.91 and install it on 1.00 or compile from source. Nr 1 would usualy be a good option, but since they switched from XFree86 to X.org's xserver, the dependency trees for the two releases are completely out of sync and will lead to a ton of headaches. Upgrading the entire distribution to 2.0 (or 1.91 if you are brave and don't mind the occasional assertion failed message) would straighten out the dependency issues and allow you to just apt or yum it in without pulling in tons of extraneous stuff or having to rely on shady "force" options.

Compiling from source is always an option of course, though you might have to shop around a bit for a version of kontact that likes the KDE binaries on Fedora.

[ Parent ]

you are forgetting a category by jjayson (3.00 / 0) #7 Mon Apr 19, 2004 at 09:49:42 AM EST
What about those entries that are not network flow, ILP, search, or brute force, but still work?

I think that both me and ucblockhead have one. Mine does a quick sort of the cards (convert to base 10 numbers, sort ascending), then it just lays each card it the first available pile. At the end, you if there is a deck is legal you will have at least 20 cards in each pile. Ucblockhead does things a little different by placing a card is the shortest piles then does some rearranging at the end.

While I'm sure ucblockhead's entry works -- he's a smart guy -- I have not tested it or tried to prove correctness for his. However, I'm fairly confidend that mine is always going to be correct.

Both of these solutions have better big-Os than those listed, however I'm unsure if they will be faster in average.

More detail on my solution. (imagine colors 1-5 instead of 0-4)

The cards gets sorted in a two-level sort: all cards with fewer colors come before all cards of more colors, and of cards with the same number of colors, treat them like numbers so that you are always trying to look at color 1 before color 2 before color 3.... This is easily achieved by just turning all cards into base-10 numbers.

Given Basically, given cards: (1), (1 4), (2 3), (2 4), (2), and (3 4). They should be ordered: (1), (2), (1 4), (2 3), (2 4), (3 4).

Now, for each card, look at the first color whose color pile has less than 20 cards. So if given (1 4), and the color 1 pile already had 20 cards, throw it into the color 4 pile.

At the end, check to see if each pile has at least 20 cards.

I think that people thought this problem was much harder than it really was.



Thought I was O(N^2) by jjayson (3.00 / 0) #8 Mon Apr 19, 2004 at 09:58:48 AM EST
I assumed K was using a some variant of a quick sort, but after talking to somebody, I'm unsure. Since after the conversion to int all the numbers are small, it might doing a radix sort.

[ Parent ]

Might not be so simple. by tmoertel (3.00 / 0) #9 Tue Apr 20, 2004 at 09:18:17 AM EST
jjayson wrote:
What about those entries that are not network flow, ILP, search, or brute force, but still work?
It's the "but still work" part that's the rub. For example, consider the following deck:
  • 20 cards of (0 1)
  • 40 cards of (0 2)
  • 20 cards of (0 3)
  • 20 cards of (0 4)
The greedy method you describe in your comment above will consume all of the (0 1) cards for the 0-pile and thus be unable to satisfy the 1-pile's requirement. Nevertheless, this is a legal deck.

--
Write Perl code? Check out LectroTest. Write markup-dense XML? Check out PXSL.

[ Parent ]

Espresso, Win-to-Lin, and the Tragic PFC | 9 comments (9 topical, 0 hidden) | Trackback