Learn R Programming

PerMallows (version 1.1)

count.perms.distance: Count permutations at a distance

Description

Given a distance (kendall, cayley, hamming or ulam), the number of items in the permutations and distance value d, how many permutations are there at distance d from any permutation?

Usage

count.perms.distance(perm.length, dist.value, dist.name = "kendall",
  disk = FALSE)

Arguments

perm.length
number of items in the permutations
dist.value
the distance
dist.name
optional. One of: kendall (default), cayley, hamming, ulam
disk
optional can only be true if counting the permutations at each Ulam distance. Insted of generating the whole set of SYT and count of permutations per distance, it loads the info from a file in the disk

Value

  • the number of permutations at the given distance

Examples

Run this code
count.perms.distance(4,1,'ulam')
count.perms.distance(4,2,'hamming')

Run the code above in your browser using DataLab