zipping lists with repetition a puzzle
play

Zipping Lists with Repetition -- a puzzle Koen Lindstrm Claessen - PowerPoint PPT Presentation

Zipping Lists with Repetition -- a puzzle Koen Lindstrm Claessen type Nat = Int data List a = Unit a | List a :++: List a | Rep Nat (List a) same length zip :: List a -> List a -> List (a,b) minimal size len :: List a -> Integer


  1. Zipping Lists with Repetition -- a puzzle Koen Lindström Claessen

  2. type Nat = Int data List a = Unit a | List a :++: List a | Rep Nat (List a) same length zip :: List a -> List a -> List (a,b) minimal size

  3. len :: List a -> Integer len (Unit x) = 1 len (p :++: q) = len p + len q len (Rep n p) = n * len p size :: List a -> Integer size (Unit x) = 1 size (p :++: q) = size p + size q size (Rep _ p) = size p

  4. zip :: List a -> List a -> List (a,b) polynomial in the size of the result (?) independent of the number of repetitions best heuristic

  5. type List a = [Node a] data Node a = Unit a | Rep Nat (List a) https://github.com/koengit/zippuzzle

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend