Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xs.map(x => // 1
- permutations(without(xs, x)) // [[2, 3], [3, 2]]
- .map(perm => [xs, ...perm]) // [[1, 2, 3], [1, 3, 2]]
- [
- // 1
- [[1, 2, 3], [1, 3, 2]],
- // 2
- [[2, 1, 3], [2, 3, 1]],
- // 3
- [[3, 1, 2], [3, 2, 1]]
- ]
- [1, 2, 3]
- - [2, 3] ->
- - [3] -> [1, 2, 3]
- - [2] -> [1, 3, 2]
- - [1, 3] ->
- - [1] -> [2, 3, 1]
- - [3] -> [2, 1, 3]
- - [1, 2] ->
- - [1] -> [3, 2, 1]
- - [2] -> [3, 1, 2]
- P(A) = {[]}
- _ _ ... _
- n+1 n 1
- x _ ... _
- n 1
- x⋅s = [x, s1, s2, ..., sn]
- x⟡S = {x⋅s : s ∈ S}
- P(A) = ⋃ {x⟡P(A{x}) : x ∈ A}
Add Comment
Please, Sign In to add comment