Welcome to Incels.is - Involuntary Celibate Forum

Welcome! This is a forum for involuntary celibates: people who lack a significant other. Are you lonely and wish you had someone in your life? You're not alone! Join our forum and talk to people just like you.

Mathcels GTFIH, can you solve this problem?

lowz1r

lowz1r

Incel
★★★★★
Joined
Jun 1, 2024
Posts
13,180
Here is a combinatorial problem I came up with:

How many ways are there to arrange the letters SEXSEXSEX such that no two of the same letters are adjacent?

For example, XSESESXEX is a valid arrangement but SSSEEEXXX is not.
To be clear, every letter in an arrangement must differ from the letter directly to the left of it (except for the first letter).

Good luck.

Let's start with a simpler case, how many ways are there to arrange SEXSEX without having any adjacent letters?

Clearly, there are only 2 cases to consider here:

Case 1: The arrangement ends in some permutation of SEX
  • The first 3 letters will also be some permutation of SEX, so we start with 3! options.
  • Then, the next letter just has to be one of {S, E, X} but different from the previous letter we chose, so that only leaves us with 2 options.
  • From there, the remaining 2 letters can be arranged however we like, so we have 2! options for those.
So we have 3! x 2 x 2! = 24


Case 2: The arrangement ends in ABA form where A and B represent any 2 characters from the set {S, E, X}.

There are 3 x 2 possible endings here, you can also think of it as (3 choose 2) x 2, both are equal to 6.

For each ending, there is only one way to arrange the beginning so it remains valid.

As an example, consider the ending XEX. It's easy to see that the only valid arrangement with this ending is SESXEX.

So we have 1 x 6 = 6

Total:

Adding those cases up, we have 24 + 6 = 30. That answers the simplified version of this question.

Back to the original problem: What if we added another SEX?

Again, we have the same 2 possible cases for the last 3 letters.

Either we can end with the remaining letters SEX or some arrangement in ABA form.

Case 1:

We build up from our previous answer, starting out with 30 options and doing the same thing we did in case 1 earlier, choose a different letter from the previous one (2 options), and finally arrange the last 2 remaining letters.

30 x 2 x 2! = 120

Case 2:

This one is a little more complicated. If we ended in ABA form,

That would leave us with 3 of one letter, 2 of one letter, and 1 of one letter.
The number of possible arrangements for the beginning would be equivalent to the number of valid arrangements for SSSEEX.

Explaining this would be tedious, but there are only 10 possible ways to arrange SSSEEX without 2 adjacent letters (since there weren't too many possibilites, you could have manually counted these pretty quickly with good heuristics).

Now if we stick ABA to the end, we have to be careful to exclude the case where our sixth letter happens to be the same as the letter we chose for A, luckily there is only one such case, let's say our ending was XEX. the only valid arrangement for the beginning with the sixth letter being X is SESESX.

So, (10 - 1) x 6 = 54.

Final Answer

Adding our cases up again, we have 120 + 54 = 174.

So there are 174 valid arrangements in total.
 
Ricardo GIFs | Tenor
 
Incels: 15, Bluepillers: 12

looks like IT can't figure it out
 
9!/(3!3!3!) - 3(8!/3!3!) + 3(7!/3!3!) + 3(7!/3!) - 6(6!/3!) - 6! + 3(5!/3!) + 3(5!) - 3(4!) + 3!
 
Last edited:
I probably could do this when I was in high school but I am way out of practice now.
 
I tried for 30 minutes, I don't think I can solve it. Combinatorials never came easy to me JFL.

9!/(3!3!3!) - 3(8!/3!3!) + 3(7!/3!3!) + 3(7!/3!) - 6(6!/3!) - 6! + 3(5!/3!) + 3(5!) - 3(4!) + 3!
How did you solve it?
 
I tried for 30 minutes, I don't think I can solve it. Combinatorials never came easy to me JFL.


How did you solve it?
he used inclusion exclusion.

u can look at my solution above if u don't want to use inclusion exclusion.
 

Similar threads

TheJester
Replies
6
Views
155
late20scel
late20scel
Tacomonkey
Replies
1
Views
219
Tacomonkey
Tacomonkey
Dneum912
Replies
21
Views
240
Brainy
Brainy
Sergeant Kelly
Replies
14
Views
286
RandomGuy
RandomGuy
_meh
Replies
26
Views
299
over_department
over_department

Users who are viewing this thread

  • shape1
    shape2
    shape3
    shape4
    shape5
    shape6
    Back
    Top