[Excel 365] Maximizing unique combinations of words - No repeats between any two words

waffle

New Member
Joined
Aug 17, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi, maybe my title is too convoluted, so I've attached an image to showcase what I'm seeking.

This pic shows 10 words (purely for example here) and next to each word is a number indicating the series of combinations each one requires... in this case 6x total for each word resulting in 6x assorted columns.

I've used RANDARRAY in this instance for my example, but I have several issues with it. First, the formula will constantly change the order of the words in each column here instead of leaving it static. Secondly, as the words highlighted in different colors show, there are multiple instances of words adjoining each other in combinations more than once. I do not want this.

What I'm seeking is twofold:

1. Static display of uniquely combined words.
2. Each column uniquely combines every word so that the next column will never repeat any two adjoining words in the same order (see the colored highlights to reference what I'm describing here). Additionally, I also want to ensure that the first word and the last word also don't repeat (see where "ham" and "apple" are another combination that repeat).

Essentially, each column is a list that will be used for a series of rounds where each word partners with another one forming a circular loop. These words can never repeat. As such the unique combinations are understandably limited. If there is a good way to maximize the most unique columns possible with the words here then that would be a good solution.

If it's possible to create a static output, then I'd also like a way for the output to be modified - this is the reason for the numbers next to the words. Say I wanted to put 4 next to "ham" after the fact... I'd like for the output to be able to only change the combinations after the 4th column.. ie column 5 + 6 would only change in that instance.
 

Attachments

  • unique-lists.PNG
    unique-lists.PNG
    20.5 KB · Views: 22

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If i understood you correctly then you missed some adicional combinations that should not repeat:

1724092097575.png


You dont want any repetition in of word right?
Like lamp-truck (green, cols 1 an 6), letter-ham(blue, col 1 and 2), and so forth.
That is really hard. I tried some brute force random numbers in it hardly got 6 rows that didn't repeat any combination.

For example
184435
225188
10910756
551971
63910210
968619
747243
3106897
473364
8125102
184435


Or another:
636539
1732103
414312
3101127
528744
86108510
789998
9471085
292461
1055676
636539


If you replace words with number form 1 to 10. i didn't get any result with 7. and i tested 2000 rows of the 10 numbers in random order, several times.
I'm not sure about the probability of the result you are looking for, but i guess it is very small.
 
Upvote 0
If i understood you correctly then you missed some adicional combinations that should not repeat:

If you replace words with number form 1 to 10. i didn't get any result with 7. and i tested 2000 rows of the 10 numbers in random order, several times.
I'm not sure about the probability of the result you are looking for, but i guess it is very small.
Hey, yes that's correct. I didn't bother highlighting all of the repeats since there's a lot... but I see you got them all!

I don't think a probability sequence is necessarily the right way of addressing this since realistically there is a maximum number of unique combinations that can be achieved with the list of names. But I'm not an expert here. I'm hoping the better-informed people here can point out a reasonable solution.
 
Upvote 0

Forum statistics

Threads
1,223,847
Messages
6,174,991
Members
452,598
Latest member
jeffreyp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top