Patience Sorted

2013-03-14, , , Comments

I gave a lightning talk today about patience sorting and its application to the longest increasing subsequence problem. It’s a subject I’ve written about before. My computer has been put through several million simulations. I’ve even coded up a javascript demo which deals out virtual playing cards and sorts them at the click of a button.

Ace of Spades 10 of Spades 6 of Spades 7 of Spades 5 of Spades King of Spades 9 of Spades Queen of Spades 2 of Spades 8 of Spades 4 of Spades 3 of Spades Knave of Spades

Today I used real playing cards; a linen-finished standard deck. For any talk it’s nice to have a prop.

Rock & Pop Legends

Now, I thought I understood the patience sort algorithm but until yesterday I’d never actually played it with real cards. I’ve been surprised by how much this physical dimension has developed my understanding.

I’ll be testing my new cards on some other sorting algorithms; I have high hopes. It would be good to find a similarly simple prop for linked data structures so I can balance trees, flip lists and walk graphs.