Partitions


New to Analytica 5.0

Partitions(k, n)

Returns the number of different ways that «n» objects can be partitioned into «k» non-empty groups. This is called the Sterling number of the second kind.

Examples

Partitions( 3, 5 ) → 25

The groupings would be:

  1. {a, b, c}, {d}, {e}
  2. {a, b, d}, {c}, {e}
  3. {a, b, e}, {c}, {d}
  4. {a, c, d}, {b}, {e}
  5. {a, c, e}, {b}, {d}
  6. {a, d, e}, {b}, {c}
  7. {b, c, d}, {a}, {e}
  8. {b, c, e}, {a}, {d}
  9. {b, d, e}, {a}, {c}
  10. {c, d, e}, {a}, {b}
  11. {a, b}, {c, d}, {e}
  12. {a, b}, (c}, {d, e}
  13. {a, b}, {c, e}, {d}
  14. {a, c}, {b, d}, {e}
  15. {a, c}, {b}, {d, e}
  16. {a, c}, {b, e}, {d}
  17. {a, d}, {b, c}, {e}
  18. {a, d}, {b}, {c, e}
  19. {a, d}, {c, e}, {d}
  20. {a, e}, {b, d}, {c}
  21. {a, e}, {b}, {d, c}
  22. {a, e}, {b, c}, {d}
  23. {b, c}, {a}, {d, e}
  24. {b, d}, {a}, {c, e}
  25. {b, e}, {a}, {c, d}

See Also

Comments


You are not allowed to post comments.