random math/logic puzzle

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
I've spent way too much time thinking about slosher and at this point I have more questions than answers. (How tall are inklings? What are the physical properties of ink? When am I going to learn fluid dynamics??) I think I might have to cut the math and stick to general observations. Either way, it'll still be a while.

so in the meantime, here's something random my brain thought of. See if you can figure it out.

I created a system that can represent any integer greater than or equal to 2 using only parentheses. The parentheses are always nested properly (meaning that the number of opening and closing parentheses are the same and that the set of parentheses to the left of a given parenthesis always contains at least as many opening parentheses as closing parentheses); incorrectly nested parentheses do not represent a number and are invalid. A single integer may correspond to more than one string of parentheses, but every valid string of parentheses corresponds to exactly one number.

Here are some examples.

10 = ()((()))
23 = ((())(()))
39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
127 = (((((())))))

The goal is to figure out how it works. Show that you have figured it out by converting (())(()((()()(())(()())))) to a regularly-formatted number.

idk how hard this is going to be so I might drop hints and/or more examples periodically, we'll see
 

missingno

Inkling Fleet Admiral
Joined
Jul 28, 2014
Messages
819
Location
Pennsylvania
Pronouns
he/him
NNID
missingno
Switch Friend Code
SW-6539-1393-3018
For a second I thought this was von Neumann ordinals.

My first intuition is that this is a base two system so it perhaps translates to binary in some way. That seems to fit 10, 23, and 39 as they have the same number of parenthesis as base two digits, but then that breaks for 73, 86, and 127 - seven digits in base two, but only six sets of parens.

127 looks like a key here, 2^7-1 and it's just six open six close. If it was seven open seven close I think I'd be on the right track, but evidently I'm not. So if my initial assumption doesn't work, what other pattern must it fit...
 

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
This should give you something to think about.
I said that it can represent any integer greater than or equal to 2, but depending on how you think about it, it's also possible to write 1. The way you write it is by writing nothing, which is part of why I didn't count it before, but here it is in the format of the previous examples:

1 =
 
Last edited:

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
Here are some examples.

10 = ()((()))
23 = ((())(()))
39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
127 = (((((())))))
btw, is there anything better to call these than "examples"? It feels like kind of a weird word to use but I can't think of anything else
 

Aiko.Octo

Inkling Commander
Joined
Jan 30, 2024
Messages
355
Location
Northeast US
Pronouns
she/her
I love these kinds of puzzles and this is so fascinating especially since upon initial examination I haven't a clue, but I am avoiding thinking too hard into it because it WILL eat my entire day if I let myself lock into trying to figure it out, lol.
 

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
I think examples describes it. If you want to give more hints, I'm curious what 9, 11, and 100 look like.
I'll do 101 because it looks cool. It's not based around base 10, if you're wondering.
I'm giving you these, but I still think analyzing the example I gave before will be more helpful.
9 = (())(())
11 = (((())))
101 = (()(()(())))
1 =
9 = (())(())
10 = ()((()))
11 = (((())))
23 = ((())(()))
39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
101 = (()(()(())))
127 = (((((())))))
I think this should be enough examples for now. although I might still do more at some point
 
Last edited:

Bennet

Inkling Fleet Admiral
Joined
Feb 22, 2024
Messages
673
Location
Inkopolis square
Pronouns
He/Him/His
NNID
BennetGG
Switch Friend Code
SW-7447-6424-1120
I am so ficking confused on this even tho I am good at math this is so Goddamn confusing
 

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
I guess it has been a while. Here's a pretty big hint for you guys.
I don't know if this is a good way to explain this, but the parentheses are commutative. Some numbers can be represented multiple ways with parentheses, but they are always just moved-around versions of each other.

For example, 10 can be written exactly 2 ways: ()((())) and ((()))().
23 can only be written 1 way, which is ((())(())), but 39 can be written 4 ways: (())(()(())), (())((())()), (()(()))(()), and ((())())(())
also, remember that you can work together if you want. You don't have to solve it individually
 
Last edited:

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
cmon guys you can do it
cough prime numbers or prime factorizations or something cough
i believe in you

although I do understand that the math/puzzle solving/whatever community doesn't intersect with splatoon's nearly as much as, for example, art people
 
Last edited:

Bennet

Inkling Fleet Admiral
Joined
Feb 22, 2024
Messages
673
Location
Inkopolis square
Pronouns
He/Him/His
NNID
BennetGG
Switch Friend Code
SW-7447-6424-1120
cmon guys you can do it
cough prime numbers or prime factorizations or something cough
i believe in you

although I do understand that the math/puzzle solving/whatever community doesn't intersect with splatoon's nearly as much as, for example, art people
It's so codclam confusing that everyone left this thread
 

electronvolt

Senior Squid
Joined
Jun 27, 2024
Messages
60
Pronouns
they/them
Each group of nested brackets represents a prime number? so () = 1 set = 1st prime (2), ((())) = 3rd prime = 5.
Putting the nested bracket sets next to each other means to multiply them, so()((())) = 2 * 5 = 10, (())(()) = 3 * 3 = 9?
And putting sets inside a pair of brackets means do ...something to the numbers, (()(())) = 2 ? 3
Based on previous examples, 3 ? 3 = 23 and 2 ? 3 = 3 ? 2 = 13 (bc (())(()(())) = (()(())) * 3)
So (())(()((()()(())(()())))) = 3 * (()((()()(())(()()))))
(
()((()()(())(()())))) would mean:
1: do 2 ? 2
2: do 2?2?3?(result of 2?2)
3: do ?(result of step 2)
4: do 2?(result of step 3)

I have no idea what operation ? is though
 

Azhdarcho

Senior Squid
Joined
Jun 4, 2024
Messages
70
Switch Friend Code
SW-3173-5595-5611
That tracks, because 100 = ((()))()()((())) = 5*2*2*5

And then also 39 = (())(()(())) = 3*13, so presumably 13 =(()(()))?

But then (()(())) appears in 101 = (()(()(())))
 

youre_a_squib_now

Inkling Fleet Admiral
Joined
Jan 30, 2024
Messages
981
Location
eastern time
Switch Friend Code
SW-8478-8105-6114
We've had quite a few new members join since I first posted this. maybe you'll be able to crack it this time around.

In case you don't remember, the goal is to figure out how each string of parentheses represents a number.
Once you have figured it out, demonstrate this knowledge by finding what number is represented by (())(()((()()(())(()())))).

Every string of parentheses represents exactly one number, but a number could be represented multiple ways.
1 = *
9 = (())(())
10 = ()((()))
11 = (((())))
23 = ((())(()))
39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
100 = ((()))()()((()))
101 = (()(()(())))
127 = (((((())))))
*I previously stated that a string containing no parentheses could possibly represent the number 1, depending on wording and such. This was rather silly of me; I made the puzzle. I can define the edge cases to be what I want. As such, I am now declaring that an empty string represents 1.

Also, here's a new one that you might find helpful.
7 = (()())

You know that the solution has something to do with "prime numbers or prime factorizations or something".

You also know that swapping sets of nested parentheses doesn't change the number that they represent, which you've figured out is because that represents multiplication, which is commutative.
Good luck.
 

OCTöHEAD

Inkling Cadet
Joined
Jun 27, 2024
Messages
172
Location
eu
Pronouns
any
Switch Friend Code
SW-1260-0911-9726
brainfarting the maths. using the spoilers but not really getting anywhere?
1 = *
9 = (())(())
(()) = 3 bc two parenteses equals the second prime and that is 3 so 3x3=9

10 = ()((()))
() = 2 being the first prime and ((())) = 5 being the third

11 = (((())))
this doesn't work though because the 4th prime number is 7, not 11

23 = ((())(()))
this screws me over as well, thinking ((()) x (())) as I dunno any whole number times another that results in 23
what kind of variable does making them uneven do?

Wait you said that the parentheses are always nested properly so it's ( 3x3 ) so 9 something 2 = 23 maybe?
what about that seven though?
7 = (()())
2x2 something 2 equals 7?? yeah no hmm getting uneven numbers with even ones it might be division. 14/2=7 but how did ()() get to 14? maybe the encircling peranteses aren't just dividing but first multiplying? and nothing gets 4 to 14. sure 2x7 goes there but eeeh I'm just grasping for straws here

39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
100 = ((()))()()((()))
101 = (()(()(())))
127 = (((((())))))

I give up for now. Sorry I didn't read back on others ideas.
 

technobyte

Semi-Pro Squid
Joined
Apr 29, 2024
Messages
81
Location
Mossdeep City
Pronouns
He/Him
I was thinking about this yesterday and went through a bunch of different processes. I realized quickly it didn't use base 10 and tried translating it to binary (and even base 3 and base 4 systems) instead, but that didn't work either. Turns out it works entirely differently from what I imagined. The prime number and number 11 hints helped out a lot! I think this might be the solution, so I'll spoiler tag it just in case. Let me know if this works!

Let's start with the idea that the number of sets translates into a prime number.

() = 1 set = 2
(()) = 2 sets = 3
((())) = 3 sets = 5
? = 7
(((()))) = 4 sets = 11

7 is the 4th prime number, but four sets translate into 11, the 5th prime number. This means the number of sets doesn't directly translate to a prime number, so let's take a different approach. We know that 1 translates into 0 parentheses. We also know that 2 is the first prime number, represented by a single set of parentheses with nothing inside. If we wanted to, we could probably write 2 as the following:

2 = () = (1)

Does this mean the number contained within the parentheses determines which prime it is? Let's test this with another number.

11 is shown as (((()))). It can also be written as ((((1)))) since there's nothing inside the innermost parentheses, and "nothing" translates to 1. ((((1)))) can translate to (((2))) since 2 is the first prime number. If we keep doing this until there are no parentheses, you get:

(((2))) = ((3)) = (5) = 11

As 11 is the fifth prime, this checks out! We also know that the arrangement of sets of parentheses is commutative, like multiplication. Based on this idea, if we wanted to write 7, we'd probably want it to look something like this:

7 = (4) = (2 × 2) = ((1)(1)) = (()())

Let's also verify this with 23, the 9th prime number.

((())(())) = (((1))((1))) = ((2)(2)) = (3 × 3) = (9) = 23

That also checks out! Now that we've established some solid rules, let's verify the other examples from post 1:

10 = ()((()))
23 = ((())(()))
39 = (())(()(()))
73 = ((()())(()))
86 = (()(()()))()
127 = (((((())))))

()((()))
= (1)(((1)))
= 2((2))
= 2(3)
= 2 × 5
= 10

(())(()(()))
= ((1))((1)((1)))
= (2)(2(2))
= 3(2 × 3)
= 3(6)
= 3 × 13
= 39

((()())(()))
= (((1)(1))((1)))
= ((2 × 2)(2))
= ((4)3)
= (7 × 3)
= (21)
= 73

(()(()()))()
= ((1)((1)(1)))(1)
= (2(2 × 2))2
= (2(4))2
= (2 × 7)2
= (14)2
= 43 × 2
= 86

Now the fun one, 127

(((((())))))
= ((((((1))))))
= (((((2)))))
= ((((3))))
= (((5)))
= ((11))
= (31)
= 127

It looks like these examples also work out!

If this is correct, then that beast of a number you gave in the post should be:

(())(()((()()(())(()()))))
= ((1))((1)(((1)(1)((1))((1)(1)))))
= (2)(2((2 × 2(2)(2 × 2))))
= 3(2((4 × 3(4))))
= 3(2((12 × 7)))
= 3(2((84)))
= 3(2(433))
= 3(2 × 3,019)
= 3(6,038)
= 3 × 59,729
= 179,187

(Thank you numberplanet.com for having a list of 10,000 prime numbers...)

It's pretty neat how the system functions recursively, taking advantage of how parentheses can be nested inside other parentheses.

I spent more time than I should have thinking about this lol. It looks like everything checks out pretty well, so I feel confident in my response. This is a pretty fun logic puzzle!

*Edited for formatting

Should I program a translator? Nah too much work... unless... ok maybe in Python or something if I find the time no promises though...
 
Last edited:

Users who are viewing this thread

Top Bottom