Group Abstract Group Abstract

Message Boards Message Boards

0
|
19 Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:
GROUPS:

Ordered pairs formed by selecting one element from each of two distinct sets

Posted 13 hours ago
a = {a1, a2, a3};
b = {b1, b2, b3, b4};
Join[Tuples[{a, b}], Tuples[{b, a}]]

enter image description here

Given the operation of choosing one element respectively from sets a and b to carry out permutation, what other solution methods are available?

POSTED BY: Bill Blair
2 Replies
Posted 3 hours ago

And

Join[Flatten[Outer[List, a, b], 1], Flatten[Outer[List, b, a], 1]]

;-)

POSTED BY: David Keith
Posted 7 hours ago
Catenate[Tuples /@ Permutations[{a, b}]]

Flatten[Table[Permutations[{i, j}], {i, a}, {j, b}], 2]
POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard