Abstract
It is a straightforward exercise to write a program to "add" two bijections---resulting in a bijection between two sum types, which runs the first bijection on elements from the left summand and the second bijection on the right. It is much less obvious how to "subtract" one bijection from another. This problem has been studied in the context of combinatorics, with several computational principles known for producing the "difference" of two bijections. We consider the problem from a computational and algebraic perspective, showing how to construct such bijections at a high level, avoiding pointwise reasoning or being forced to construct the forward and backward directions separately---without sacrificing performance.
Supplemental Material
- Conal Elliott. 2008. Elegant memoization with functional memo tries. (2008). http://conal.net/blog/posts/ elegant- memoization- with- functional- memo- triesGoogle Scholar
- Conal Elliott. 2018. The MemoTrie package. (2018). http://hackage.haskell.org/package/MemoTrieGoogle Scholar
- Adriano M Garsia and Stephen C Milne. 1981. Method for constructing bijections for classical partition identities. Proceedings of the National Academy of Sciences 78, 4 (1981), 2026–2028.Google Scholar
Cross Ref
- Basil Gordon. 1983. Sieve-equivalence and explicit bijections. Journal of Combinatorial Theory, Series A 34, 1 (1983), 90–93.Google Scholar
Cross Ref
- Bjarki Ágúst Guðmundsson. 2017. Formalizing the translation method in Agda. Master’s thesis. Reykjavik University, Iceland.Google Scholar
- André Joyal, Ross Street, and Dominic Verity. 1996. Traced monoidal categories. In Mathematical Proceedings of the Cambridge Philosophical Society, Vol. 119. Cambridge University Press, 447–468.Google Scholar
Cross Ref
- Matthew Pickering, Gergő Érdi, Simon Peyton Jones, and Richard A Eisenberg. 2016. Pattern synonyms. In Proceedings of the 9th International Symposium on Haskell. ACM, 80–91. Google Scholar
Digital Library
Index Terms
What’s the difference? a functional pearl on subtracting bijections
Recommendations
On bijections for pattern-avoiding permutations
By considering bijections from the set of Dyck paths of length 2n onto each of S"n(321) and S"n(132), Elizalde and Pak in [S. Elizalde, I. Pak, Bijections for refined restricted permutations, J. Combin. Theory Ser. A 105 (2004) 207-219] gave a bijection ...
On the combinatorics of derangements and related permutations
Highlights- Provide a bijection combinatorial proof for the facts that The number of derangements of length n equals the number of permutations of length n that have ...
AbstractA derangement is a permutation in which no entry is at its original position. The number of derangements of [ n ] is called the “derangement number” or “de Montmort number”, and is denoted by D n. The sequence { D n } enumerates, in ...
Another look at bijections for pattern-avoiding permutations
In Bloom and Saracino (2009) [2] we proved that a natural bijection @C:S"n(321)->S"n(132) that Robertson defined by an iterative process in Robertson (2004) [8] preserves the numbers of fixed points and excedances in each @s@?S"n(321). The proof ...






Comments