Guest User

Untitled

a guest
Nov 15th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. xs.map(x => // 1
  2.  
  3. permutations(without(xs, x)) // [[2, 3], [3, 2]]
  4.  
  5. .map(perm => [xs, ...perm]) // [[1, 2, 3], [1, 3, 2]]
  6.  
  7. [
  8. // 1
  9. [[1, 2, 3], [1, 3, 2]],
  10. // 2
  11. [[2, 1, 3], [2, 3, 1]],
  12. // 3
  13. [[3, 1, 2], [3, 2, 1]]
  14. ]
  15.  
  16. [1, 2, 3]
  17. - [2, 3] ->
  18. - [3] -> [1, 2, 3]
  19. - [2] -> [1, 3, 2]
  20. - [1, 3] ->
  21. - [1] -> [2, 3, 1]
  22. - [3] -> [2, 1, 3]
  23. - [1, 2] ->
  24. - [1] -> [3, 2, 1]
  25. - [2] -> [3, 1, 2]
  26.  
  27. P(A) = {[]}
  28.  
  29. _ _ ... _
  30. n+1 n 1
  31.  
  32. x _ ... _
  33. n 1
  34.  
  35. x⋅s = [x, s1, s2, ..., sn]
  36. x⟡S = {x⋅s : s ∈ S}
  37.  
  38. P(A) = ⋃ {x⟡P(A{x}) : x ∈ A}
Add Comment
Please, Sign In to add comment