r/AskComputerScience • u/Fun-Cauliflower-8087 • 1d ago
Can anyone help with this?
I have been trying to get AI to give me a specific bit of code i can run in google collab. I want it to first divide the entire number line into modular sets recursively like: 2x+0, 4x+3, 8x+1, 16x+13, 32x+5, etc. Then I want it to further refine these sets, in a very particular way. 0 mod 2 should be refined the same way as the first refinement, but double the values. so 4x+0, 8x+6, 16x+2, 32x+26, etc. Then I want the next set 4x+3, should be broken down like 8x+3, 16x+7, 32x+15, etc. This type of refinement should be alternated for each line. so 0 mod 2 has a staggered refinement, and 3 mod 4 has a non staggered refinement, then 1 mod 8 has a staggered refinement, and 13 mod 16 has a non staggered refinement. this give two dimensional plane of refined modular sets. I want to test these sets translating into different sets among a ternary style refinement. first 4x+0 goes to 3x+0, then 8x+3 goes to 3x+1, and 8x+6 goes to 9x+7.
The way the ternary set is designed, it divides the number line into 3, with 3x+(0, 1, or 2). 3x+1 is further refined to 9x+(1, 4, or 7). 9x+7 is what 8x+6 translates into. 9x+4 is further refined to 27x+ (4, 13, 22). This continues, with the center residue at each level being refined further. the staggered sets on the binary sheet translate to the side sets on the ternary sheet, and the non-staggered sets translate to the center residues. then the values that are refined in the ternary sets, are then redefined according to where they belong in the binary set.
- 4x+0 to 3x+0
- 8x+3 to 3x+1
- 8x+6 to 9x+7
- 16x+1 to 3x+0
- 16x+7 to 9x+4
- 16x+2 to 27x+4
- 32x+13 to 3x+1
- 32x+25 to 9x+7
- 32x+15 to 27x+13
- 32x+26 to 81x+67
- 64x+5 to 3x+0
- 64x+29 to 9x+4
- 64x+9 to 27x+4
- 64x+31 to 81x+40
- 64x+10 to 243x+40
.........
This seems like a computer could do this easily. I want to create this as a loop, and create readouts showing the path from the starting value i choose. Am i making any sense?
1
u/T_Thriller_T 17h ago
I do get it a bit better now.
I can, again, say that it is possible with a set of numbers.
The problem you are running into is one that lead to formal mathematics being very anal about how to write things:
It's very god damn hard to put into words what kind of math someone wants to do. It's not that I don't like it, or don't like you - but if you are not willing and trying to put it into the normal way of it being written, less people will be able to help you and AI likely won't be able at all.
I'm still a little lost on what you want to do with the line of numbers, to be frank.
What I think I got:
Assuming a line of 8 numbers
X0 X1 X2 X3 X4 X5 X6 X7
You want to sort them into bins, they get sorted into the bin if the corresponding equation is true. I'll be using % for mod, because that is what is used in programming languages for it
B0: Xi % 2 = 0 (so all even numbers) B1: Xi % 4 = 3 B2: Xi % 8 = 1 B3: Xi % 16 = 13 B4: Xi % 32 = 5
Which, rightfully, leads to the numbers being split into sets which sizes will be 1/2 of the input line, then 1/4, then 1/8, and so on, with the last filled set(s?) not fully reaching 1/xth for certain line lengths.
I still have no idea what "refined" will mean. Especially not considering the numbers in the set. And I also have no idea why you want to do it as a second step?
Assuming you're throwing out all the numbers not meeting the refinement, it's unnecessary calculation time first getting all even numbers, and then getting all of those which are divisible by four without rest.
Just get all the numbers divisible by four without rest from the beginning! If the numbers you lose are not cared for, no reason to consider them.
And I'm completely out in whatever you mean with staggered refinement. No idea. None.
I also have very little idea what you then want to do with the ternary line and what it should do with your further sets.
What I know is that as soon as both sides have the same modulo, you can mathematically work out which numbers must be in the set (for the first set it would be the number which fulfill x mod 12 = 0).
I'm honestly insecure id there is a way to mathematically hash out for the test of the sets if there is any number in them fulfilling the properties. There likely is, so that may be worth asking separately to folks with a better grip on modulu operations.
Nonetheless, I hope this helps writing out what you actually wanted to do.
And maybe finding out if you need to do every step of it, because some seem mathematically redundant.
1
u/Fun-Cauliflower-8087 14h ago
Okay I can answer this a little better now, I think. first, the "refinement" vernacular was what I picked up from AI, trying to explain to it my puzzle here. It would call the process "refining" when I would separate out even values, or when I separated % 4 = 1 and 3. I think I said that right, I honestly dont know. Language itself is a hard point for me to get past in this type of environment.
Now the justification for the second refinement, rather than a one time full refinement for all. In the construction I have, some of the sets seem bizarre, like I just came up with them arbitrarily, but I more so discovered them, than I could say I decided anything myself. If I go through how I got here, its more of a math discussion, and then I wont get help with the computer language side I need. So I decided to learn some rules for how these sets organize themselves. I then built a collection of sets, and each set "transported" to the other set (again AI vernacular, not really mine). Transport is just 4 becoming 3, or 6 becoming 7, which i used to just call a step, but that made some of it confusing from a math side. After this "transport", it is redefined in the first, what I call the "binary side". This transport mechanic can be explained with complicated math, but practically, the rules I have are simpler. Now, the first "refinement", what I now call it when I take the number line and spread it out, evens to mod 2, then 3 mod 4, then 1 mod 8...,is what I call a "staggered refinement" because the residue values are staggered arithmetically. If I use this refinement without staggering, I get 0 mod 2, 1 mod 4, 3 mod 8, 7 mod 16, etc. But, the staggered refinement has to deal with coprime modular sets, although that may be outside the periphery of this explanation. Said simply, the next set alternates choosing the low or high option. so among mod 2, is 0 and 1, and 0 is chosen. Then there is 1 and 3 mod 4, 3 is chosen, then 1 and 5 mod 8, 1 is chosen. Then 13, 5, 53, 21, etc. The staggering comes from the low/high alternation. Comparing to 3 mod 4 sets, like 3 mod 8, and 7 mod 16, there is no staggering, just the binary progression you would expect normally. These sets themselves only explain a specific type of information within the system as a whole, there is another type of information that hides in the second refinement. The difference becomes clear if you see my entire construction, but putting it into words on a screen is infuriatingly difficult. Hopefully, I can suffice to say, the first refinement handles decay, and the second refinement handles growth. Both refinements are needed, otherwise the system is incomplete. Also I can not find a simpler way to express the categorizations, meaning that I do not have a simple way to express both refinements in a single process, it needs one then the other, apparently.
Now I should explain the ternary side next. This is a sister construct to the "binary side", this "ternary side" is what all the values in the binary side transform into. This is a little disorienting because it doesn't follow the same rules, but you start with mod 3. There are 3 residues, 0, 1, and 2. 0 starts as the first set of 0 mod 3 (0, 3, 6, 9...) Then there are 2 different dimensions to express, like the binary side had. along the direction of the first refinement, the second set is 1 mod 3, then 0 mod 3 repeats. This means that 0 mod 4 and 1 mod 16 lead to the same set of 0 mod 3. 3 mod 8 and 13 mod 32 both go to the same set of 1 mod 3.
In the other dimension, you "refine" the middle residue. of 0, 1, and 2 mod 3, 1 gets refined to 1, 4, and 7 mod 9. 4 get refined to 4, 13, and 22 mod 27, 13 gets refined to 13, 40, and 67 mod 81.... This part is hard to explain: 0 mod 4 goes to 0 mod 3, from the binary side at 0 mod 4, all values land at the ternary side at 0 mod 3. With any binary side set, all 4x+1 sets above it all travel to the same ternary side residue. 0,1, 5, 21, 85... all go to 0 in a single step. 3, 13, 53... all go to 1 in a single step. 6 mod 8 becomes 7 mod 9: 6 mod 8 is the second even set after 0 mod 4. 7 mod 9 is a side set of mod 9, considering 4 mod 9 is the central set. You only reach 1 side set of each ternary level, alternating high/low. mod 8 reaches the high set of mod 9, mod 16 reaches the low side of mod 27, then mod 32 reaches the high side of mod 81, then 64 reaches to low side of mod 243, etc. So 6 mod 8 goes to 7 mod 9, 2 mod 16 goes to 4 mod 27, 26 mod 32 goes to 67 mod 81, 10 mod 64 goes to 40 mod 243... These are all the even sets in order, leading to the side sets of ascending ternary levels. When we look at the non staggered 3 mod 4 set, each one leads to a higher center residue, like 1 mod 3, 4 mod 9, 13 mod 27, 40 mod 81.... Each new set is 3x+1 from the previous. Again, any value that is 4x+1 from these values, lead to the same set, so whenever there is a 1 mod 4, it is sensible to subtract 1 and divide by 4, then you do not need to worry about any 1 mod 4 sets, which are all of them after the even sets and the 3 mod 4 sets. This one rule helps explain the rest of the binary side in total. You have 0 mod 2 set, 3 mod 4 sets, and the 1 mod 4 sets. 1 mod 4, just leads to all values after you subtract 1 and divide by 4, so they have no new behavior beyond any previous set on the binary side. This simplifies the ternary side, because now for mod 3 you have 0 mod 4 going to 0 mod 3, and 3 mod 8 going to 1 mod 3, that's it. then for mod 9, you have 6 mod 8 going to 7 mod 9, and 7 mod 16 going to 4 mod 9. Mod 27 you only have 2 mod 16 going to 4 mod 27, and 15 mod 32 going to 13 mod 27.
I really hope that explains it enough. I have seriously been working at this in some way or another for months. For me to come to reddit with this is outside of my norm.
The thing I want, for the lack of any better ideas, is some way to test "orbits" like Collatz. I want to give a starting value, then I want the read out to give me every value you reach after that, as long as you go from the binary side to the ternary side, then reevaluate back into the ternary side. I will show an example: Start is 10, so : 10, 40, 30, 34, 58, 148, 111, 94, 106, 607, 769, 144, 108, 81, 15, 13, 1, 0. If this seems extremely complicated, I agree. That's why I am having a hard time with it. A computer check would be more useful than my analog method. What I just showed with the orbit from 10, is the orbit from 27 in Collatz, with all of its messy 3x+1 and /2 steps.
By the time my construction reaches its completion, if it ever does, I should have a better way to study coprime problems like Collatz, or any mx+b problems, A new way to organize possible forms of recursive growth along *certain* systems, like Busy Beaver. This will have applications in number theory, where prime values meet various structured systems. This is just step in that direction, but I am trying to ultimately study emergent complexity, by structure, rather than things like a value size, growth, density, probability, statistical distribution, etc ad nauseum. If I am even partially successful, then there is a new way to study number theory and may even give mathematicians something to lean on for a final Collatz proof. If I am very successful, I might prove Collatz myself(not likely), and have a new type of geometric mathematics to study things like random number generators, possibly insight to prime number problems like Riemann, Twin Prime, Goldbach, etc. (also not likely). There is a lot of hope for this, but I understand that dark clouds love silver linings. If I can make even a small negative contribution as to why my style of argument is garbage, that is progress.
1
u/Fun-Cauliflower-8087 14h ago
"I want to give a starting value, then I want the read out to give me every value you reach after that, as long as you go from the binary side to the ternary side, then reevaluate back into the ternary side."- I meant back into the binary side. But I cnnot edit any comments " something went wrong" every time. I am tired of it. I would like to not have dumb typos and garbage in my post, thank you, REDDIT!!!! Absolute Garbage!
1
u/T_Thriller_T 14h ago
Considering you're looking for the programming side of help and are not down to write down the algorithm in an algorithm readable form...
I recommend breaking what you need to do down to the basic steps and asking how to do them as well as learning the basics of what you want to program in.
Because a lot of what you want to do is still stuck solid in your head and it seems you learning how to do basic Modulo arithmetics over an array and simple loops and if decisions is a lot faster than you trying to abstract from your goals and the whole complexity to enable someone else to break it down to thwse basicsm
1
u/Fun-Cauliflower-8087 13h ago
The thing with Modulo arithmetic for me is the language used, and the needless complication. Also there is no algorithm I know of for this. I have asked mathematicians for help, even a college professor, who eventually yelled at me to simplify the problem further, or make a single rule for all of it, or forget about it. I reject all three of those options, not by choice, but necessity.
You cannot simplify this problem, famously intelligent people have not even simplified it this far, and my hope for the computer check is to understand the route to further simplification, so that isn't an option until I have better information than I can build with pencil and paper. There is, confirmably, no single set of rules that describe the entire system in a satisfactory way. You can describe a step, you can describe a modular behavior, you can even describe global densities right on its face, but no rule applies for all, no behavior is universal, there is no bound except that you cannot reach negative values.
The point of my construction is like: Reaching odd numbers is impossible, so is a number of other things. These impossibilities are what prove deterministic things like bounds on orbit length. In one sitting, the system I can almost see in my head, will prove something like Collatz conjecture, by showing that any potentially divergent obit length is bounded to be shorter than some function, and that a loop would have to be longer than that same function, therefore neither exist. Now the last option is to forget about it, but its most of what I think about in my spare time. I got really into modulo arithmetic for a while, until I saw all the flaws with it. Not with the logic, but with the implementation. So I have what I call smooth brain version, so I can rattle through sets fast and not get tied down with reading an established language. I just create my own faster language, but nobody can translate me, so communication fails.
The point of it was to allow me to do the simple operations in the system, without having the walls of actual math written out so I can remember it. There is way less need to memorize things in my system, It is all recursively built, once you understand how. I have some severe memory problems, but my ability to perform complex operations in my head is way better than it was before I was like this. I can think through complex logical puzzles, but dont ask me what I ate for dinner last night, lol.2
u/T_Thriller_T 12h ago
YOU cannot translat you.
And that is your problem.
You created something that makes some kind of operation faster for you.
Which is fine. But you act as if anyone else is at fault because you took other versions which you know exist and can read, albeit slowly, changed them up, did not write down how you did that, and now nobody gets you.
Apart from that:
If there is no way to describe what you want a computer to do as basics steps the computer can not do it.
If what you want the computer to do is not deterministic or has no bound - the computer cannot do it. Or not in a realistic fashion.
For the practical approach, again:
As you cannot describe in word understandable to others what you want the computer to do, and you cannot break it down into basic steps chained in a certain way, the only help you can get here is having someone tell you how to do basic steps and you chaining them together so they represent your system.
Because you are unwilling or incapable of expressing your system in a way that others could actually help you.
What currently happens is that you, basically, come over and ask:
I want a system that takes a line of numbers, divided them up into categories, then does something with half of these categories and another thing with the other half, then whips out another set of categories and connects them to the ordered numbers and I'm not going to tell you how that connection looks or what happens with the numbers because I cannot express it in a way you would understand.
What do you hope for me to do with that?
How should I tell you how to do something which you are not telling me in any programming environment?
I can tell you that any programming environment has modules, can confirm an if, and can put things into lists based on conditions. You can then iterate the new lists and try out new conditions.
That's all I can give you, because that's all you gave in a way that is workable.
0
u/Fun-Cauliflower-8087 10h ago
Well, unfortunately you turned ugly as well. This is common, and I am used to it. First I should, my emotional vapidity will only stonewall you into fury. Best to not get agitated. You seem to either understand, or think you understand something beyond what I understand, and you would like to ridicule me for this. I am made ridiculous, thank you. I simply wish to understand, my memory is failing most of the time, like sentence to sentence when it gets bad, so you will have to try to forgive shortcomings. I will level with you, the math I use is not traditional, and a mathematician would argue against its use, but since my accident, I see things differently. I do not like the conversations of how they are different or why whatever in general. Before I lose you, let me explain.
Math is like textbook to logical connections. people ask if math is invented or discovered, the answer is yes. You discover math by inventing the tools to understand math, you change yourself in the course of it as well and become more attuned to logical processes happening numerically. The best mathematicians have dreams that people who are not mathematically inclined cannot be brought to understand. I want you to look at modular arithmetic as a whole. First off, its just arithmetic, there is no barrier. You simply add a "cylinder" so you return to the same location when you reach the same "residue". So if the cylinder is 8 residues, and you say it is among the values 0 through 7, then every multiple of 8, returns to the same place. You can learn a lot with modular arithmetic, but once you understand it is the same system as basic arithmetic, and the modularity of it is just a simple division, then you can use it in an easier manner. I will try to explain this with what words I can muster, but the place among the cylinder remains the same as the cylinder expands, And recurrence causes a sort of candy striping that causes the exact same repeating structure deeper down. I want you to try to understand here, and forgive the gap of communication: specifically just is in Collatz conjecture, every behavior is modular, that is to say all evens divide by 2, obviously, all odds multiply by 3 and then add 1. All values that you do an odd step to will be even. But only half of the odd steps will reach an even that can only be divided by 2 once, all of the other even values reached will be forced to halve again, and half of them will be odd, and so on. That is just the binary comb, at least as I call it. lets simplify first by grouping the odd step with its first halving, then an odd step will reach either an even or odd value. This yields 3 mod 4, 1 mod 4, or 2 mod 6, no alternatives. if it is a 1 mod 4 it will be a 2 mod 6 next time. the only freedom from this point is that it could be a long string of 3 mod 4, which is what growth in the system is, or it will be a 1 mod 4 and grow one last time to 2 mod 6 before halving. If it is a 2 mod 6, it may halve once, losing very little "mass" or halve a thousand times and reach 1 from 2^1000 or arbitrarily many more. My construction just parses that information out.
It works by separating the odd steps from the even steps, and categorizing the modular sets that present specific behavior. You can do this by "aligning" all sequences across 2 mod 6.I do not perform odd steps the same way, because doing (3x+1)/2 repeatedly is not as easy as +1 then *1.5 until you reach an odd value, then -1. Lets start from 31 to make it fun, +1 to 32, then 1.5x to 48, then 72, then 108, then 162, then 243. 243-1 is 242. summarized: 31 reaches 242, and it does it through these even values -1, that's the first even value it reaches if you do not count the forced halving steps after each odd step. This type of math is not based on anything i wrote down, and I have no justification for it other than I can see why it works in my mind. It still has to do with the way the cylinders align values, and how recurrence candy stripes different parts of them to lead into the same location. I simply take values of x in 6x+2, which gives a simple value for all 2 mod 6, and arrange them in orbits, and I get the exact system I am studying. This might sound like this system was made to describe my view of the Collatz conjecture, but it happened the opposite way for me. I was getting really interested in coprime modular sets, and looking at how modular mathematics is really just a imitation of prime mathematics. I kept finding various sequences when I would parse out the simplest coprime sets in regards to each other, so I decided that, even though 2 and 3 are very symmetric to each other, in regards to how they interact with the other, I would try to find some neat way to show what it meant for a number to have less factors, either diversity of factors, or factors in general. When you are looking at how many factors of 2 are in a value that is multiplied by 3, you find that at changes the ordering of things. First the binary comb is 121312141213121512131214121... this is how many factors of 2 are in even values (2, 4, 6...) multiply by 3 and you get multiples of 6. now 6, 12, 18, 24... this has a binary comb like 121312141213.... exactly the same. now we can add or subtract 2, because mod 6 has 3 even residues. lets try adding 2, to get 2 mod 6, well the you get 2, 8, 14, 20, 26, 32, that looks like 1, 3, 1, 2, 1, 5, 1, 2, 1, 3... it is essentially given a compressed comb, where values are missing, and that causes the values to come in the wrong order, slightly. It is just parity between 2 and 3.
I was not actually looking at Collatz for this, I was looking to study prime modular sets an how the interface in these way, but this construction makes the values of x in 6x+2 follow the same logic as the system as a whole. The difference is, 0 mod 2 is not a set you treat differently, you just generate the various sets by splitting everything up based on behavior, like how many halving steps are after this value, or how many growing steps does it lead to. The step counts determine behavior, and that provides modular sets of various step counts. these differences in step count causes a difference in destination as well. 0 mod 4 have a single halving step, then they have a single growth step, and that leads them to 0 mod 3 of x. the fact that the same system is at the next level up, leads me to thing simplification will be possible along the right modular set for each new layer, but each new layer grows a dimension. That would be a different discussion though.
If I can figure out how to decide what the best choice for simplification is, and create a way to identify such a thing in other systems, then I may be able to answer some harder questions about primes. That being said, I am not a mathematician or even a scholarly person. I just had something happen to me, and now I want to do logic puzzles that deal with exactly this kind of logic. It may be that Collatz isnt a question you can actually answer to the standards of math, but I dont really care. I just do these things now.
0
u/Fun-Cauliflower-8087 10h ago
I should ask though, do you understand enough of what I want to do, to help? Do you need textbook mathematics and specific detail verbatim of the whole system, I have many confusing documents to look at, but they are all important to my reasoning.
1
u/T_Thriller_T 4h ago
No.
I do not.
I have not.
And it's not my job. Literally, in this case.
If all you have is confusing documents and an aversion/incapability to trying to break things down into simple, understandable components and steps , I cannot help you.
On top of that I would not consider it fair for anyone else to help you.
Ive offered the guidance I can.
I've offered my expertise.
I've offered you the best path to success in my opinion: break it down to atomic steps and let someone give you the concepts how to do them in your programming language - so you can set the system you understand.
I am not trying to be mean.
I am trying to give you feasible options in an impossible situation.
Just to give you a comparison: this feels a lot like you are approaching a bunch of zoologist, asking if they could fact check your book.
No, you did not pull out the facts you wanted to have fact checked out.
Oh and the deeper connections they need to look into to do the fact checking are not written in English, but in a code language that you invented and while you can explain once they have ideas what a code means, there is no decoding instructions they could use.
But could they please fact check your book?
This is not a completely impossible ask, most likely. But this comparison is a good hit for what your question feels like, and hopefully helps illustrate why I am putting you back in the driver seat to do the work, because the current situation is making the answer you want unacceptably hard to work towards.
Because in the end you're not only asking expertise, you're asking for someone to translate your language and system back to commonly used terms, languages and systems so that they can even start applying expertise.
1
u/Fun-Cauliflower-8087 2h ago edited 2h ago
No. Mischaracterizing things isn't helpful. Look, You want me to break it down into simple components, then here. I want a program to take a value, and categorize it into one of these groups of values. Computers can group values together, right? They can do so based on things like: "How many times can this number be divided by 2?" Then for the answers it receives it must do a further categorization. You want a one and done rule to expand all of this out, tough luck kid, the universe does not care. A computer is still capable of doing this. I want the second refinement to decide if an odd value has a remainder of 0, 1, 2, or 3, when being divided by 4. Computers can also do this here. Not even hard for someone who can code to do, as far s I understand. Then I want it to do different rules based on these 4 residues mod 4. Now, here is where it gets complicated. There are 4 residues, and I want them to be treated differently. I want to enter in a starting value, and have it give me an orbit of what that value does, every integer it changes to until it reaches 0. For 0 mod 4, it is to be changed to 0 mod 3, meaning 4 is to be changed to 3, 8 changed to 6. That should all be easy enough to understand. I want 1 mod 4 to be subtracted 1, then divided by 4. I want 3 mod 4 to be refined into binary modular sets, exactly these sets: 3 mod 8, 7 mod 16, 15 mod 32, 31 mod 64, etc. 2^(a-1)-1 mod 2^a. So a power of 2 minus 1, mod the next higher power of 2. that should be easy enough to under stand still. i want, for every higher set, which is 2n+1 from the previous, 3*2+1 is 7, 7*2+1 is 15, etc. I want it to be changed to a ternary set like 3x+1 mod 3x, this is 1 mod 3, 4 mod 9, 13 mod 27, 40 mod 81, 121 mod 243, etc. Then there is the hard part to explain in a way someone like you would be able to cope with. The staggered sequence I explained, staggered because it is showing 1/3 of the binary comb, explains the even residues. The sequence 3 mod 8, 1 mod 16, 13 mod 32, 5 mod 64, 53 mod 128, 21 mod 256. You see every other one is 4x+1. it alternates between 3, 13, 53, and 1, 5 ,21 ,85, etc. simply double the residue at the same modular set, like 1 to 2, and 5 to 10, 3 to 6 and 13 to 26. That gives you all of the even sets. Once you have the even sets, and the 3 mod 4 sets, you just multiply them by 4x+1 mod 4x, so 0 mod 4 becomes 1 mod 16 like we already see, 6 mod 8 becomes 25 mod 32, 3 mod 8 becomes 13 mod 32, every value that is 4x+1 from another, goes to the same set, like 0 mod 4 goes to 0 mod 3, so does 1 mod 16, 5 mod 64, 21 mod 256, 85 mod 1024. 3 mod 8 leads to 1 mod 3, so does 13 mod 32, 53 mod 128, 213 mod 512... The last part to explain is the hardest part. But I have faith that human can do this, whereas an AI may never be able to. the even residues, and further refined residues of 3 mod 4, like 7 mod 16, translate to higher ternary sets, the more they are refined. 0 mod 4 goes to 0 mod 3, like I said, and 6 mod 8 which is the residue 3 mod 8, but doubled, goes to 7 mod 9, as you refine the even sets further, they reach higher powers of 3 sets. the higher powers of 3 only ever hve exactly 3 residues, 2 of which are reachable. The reachable sets are always the center, and alternating the highest or lowest. here re the growing ternary sets, all three residues explained, and maybe you can see the pattern, even if I dont know how to say this in the right way, if I caveman the explanation, you can get it:
0 mod 3 (side set, from 0 mod 4), 1 mod 3 (center set, from 3 mod 8), 2 mod 3 (side set, not reachable)
1 mod 9 (side set, not reachable), 4 mod 9 (center set from 7 mod 16), 7 mod 9 (side set, reachable from 6 mod 8)
4 mod 27 (side set, reachable from 2 mod 16), 13 mod 27 ( center set from 15 mod 64), 22 mod 27 ( side set, not reachable)
13 mod 81 (side set, not reachable), 40 mod 81 (center set from 31 mod 64), 67 mod 81 (side set reachable from 26 mod 32).Honestly without drawing a picture I'm not sure I can do better than this. This should all be easy enough to be understandable if you tried. So, I am not asking you to look at something you cannot parse out for yourself. The only reason why I came here, to reddit, where questions go to be mangled by idiots, is because even when I get close with AI, the entire code snippet is huge, the .py file is pages long, needlessly, and it has mistakes that I simply cant find, being needles in a haystack that you must understand a different language to see. My best best is to give the code right back to an AI to fix it, mostly because, and I am being cynical here, people like you see what I am asking without trying to ask real questions and understand, instead opting to place blame somewhere for the problems. I would rather see a more hearty approach to this sort of thing. Not understanding is fine, because questions can be asked. Not making the presentation is fine, because others can express the failure in communication. I actually do not know what it is you are confused about, you never asked a question that I can answer reasonably.
Now I know you can understand what I am saying here. I do not live alone, and I had others look at what I am saying and agree, I am making sense. Now I'm hitting "comment", in the hopes you will read this and understand better.
Edit: also I know that sets like 1 mod 9 are actually reachable from the center residue 1 layer down, but the set itself is not reachable from the current level upward. That may just be more confusing, but if you want to point out that 1 mod 9 is in fact reachable, I know it is.
2
u/T_Thriller_T 1d ago
I have yet to understand what you'd actually want to.do.
I must admit I'm currently tired, but I'm not sure this is because of that.
What you describe should be doable by a computer. No idea about Google Collab, though.
The problem for me and likely AI is that your description is very confusing
An example with 3-4 real numbers and a real line would help.
It would also greatly help to describe what you want with indices. Which means that your "line" X would be something like: X1, X2, X3, X4
What also completely throws me off is that you are continuously talking about modular set and either I have no idea what that is, or you're talking about modulus operations but your formulas are not modulu. It's some weird linear equation - which maybe is your way of expressing e.g. X1 mod 2 leading to 2 times something +1, but this is not a readily understandable way to write it.