Let's say that I have two ordered sets of numbers <mo fence="false" stretchy="false">{ 1 ,

rynosluv101wopds

rynosluv101wopds

Answered question

2022-05-15

Let's say that I have two ordered sets of numbers { 1 , 2 } and { 3 , 4 }. I'm trying to figure out the number of possible ways to combine these two sets into one without breaking the ordering of the two sets.
So for instance, { 1 , 2 , 3 , 4 }, { 3 , 4 , 1 , 2 }, and { 1 , 3 , 2 , 4 } are valid combinations, but { 2 , 1 , 4 , 3 } isn't. How do I figure out the number of valid combinations? This feels like something I should remember from college, but I'm drawing a blank. It feels somewhere in between a combination and a permutation.

Answer & Explanation

Kendal Perez

Kendal Perez

Beginner2022-05-16Added 9 answers

You are talking about (resulting) tuples I presume (and not sets).
If the sets are S with s elements and T with t elements, then the total possible tuples is ( s + t s ) .
Basically, you have s + t slots and you pick the slots (say s) for one of the sets in ( s + t s ) ways. Once the slots are chosen, all the s + t numbers can now be filled in only one way.
So the total is ( s + t s ) .

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?