last day (34 days later) » 

5:41 AM
I think I found a part of 2time reverse string
If a string have pair that do not overlap each other, then it's restore for 2 or 1 step
If it's a palindrome then 1 step
else 2
@Ausername hope this clue help
 
Ok.
I've modified my program so it stops when it finds a duplicate.
I'm not sure if it will.
 
abcabc is 4 iter and have 3 crossed pair
abcdabcd is 5 iter
 
@Ausername duplicates and cycles tend to happen in string modification things
 
abcdeabcde =>6
I think same mode continues
 
I wonder if there's one that repeats through every single permutation of itself? (aside from trivial ones like "aaa")
 
5:55 AM
You can split string a GCD two splited string if both string are independent from each other
 
But when they overlap...
 
Then it's getting messy
 
:57787786very hard to find
 
abcabc is 4
abcabcabc is 8
abcabcabcabc is 16
interesting
you can make a array base on how many char and multiply how many time
 
I found a period 17: awbacbdcedfexf
 
6:00 AM
and you will find (char amount)^(repeated time) or something similar
for the exception of repeated 1 time
which have no pair and is always 1
(char amount -1)^(repeat)
wait nvm
wrong theory
char = 4, repeat = 3 gives 8 instead of 27
 
You can get lots with random strings of digits: 123245231561346 gives 2617.
 
I think it has a mathematical way to calculate such number instead of bruteforcing
 
425234435 is a 7
Probably, but it would be difficult
 
We can write a paper base on this question holy crap
 
We could try a different Stack exchange site
MathOverflow maybe?
Or computer science
 
6:08 AM
If this get marked as dupe on other sites that would be hilarious
 
I'm going to try make a list of some different period ones:
 
We should try a pattern
And I just realise I wasted another class for codegolf
 
It is actually based on the pattern it makes - ∑´£∑ is the same as 1231 in terms of pattern.
 
I mean testing a series of string that follow same pattern
 
This is interesting
1231 - 2
12312 - 3
123123 - 4
 
6:12 AM
123123123 - 8
(123)*4 - 16
 
You can make an arbitrary period one: For a number n , just take n-1 different characters, cocatenate them, and repeat that twice. For example 5 => 12341234.
 
@Ausername that's true
For 2^n, n>2, you can multiply string by n time
any string that does not loops itself
 
Repeating 3 times always gives 8, and for 4 times the series goes 16, 38, 30, 74, 536, 155 with no real discernible pattern
 
uh
i thought it was 2^n
but (abc)*5 gives 22
 
That is weird
 
6:22 AM
You can make a excal with all possible solution of this pattern
 
Hmm.. 121345165676828447638374672 has at least 16m values, because it crashed my program...
(It's the base pattern of 'Determine if a dot(comma) program halts')
The 4x sequence goes 16, 38, 30, 74, 536, 155, 182, 1433, 8596, 11381, 806, 35235, 169720, 387190, 37500, 92311, 87798, then tio dies on me.
 
@Ausername It's different, notice the uppercase D is different from lowercase d
 
Yes, so they're both removable.
 
6:39 AM
oh you simplied the string thats smart
And after analyzing 165128676548312767443746382 a bit
I found that some place only appear certain digits
second digit can only be 2,5,3,6
second last digits is 1,7,8
And there is no 8 following 1
I've think up a possiblity:
Maybe our test to pattern (123) or similar is at some point wrong
we might get the same string, but wrong index, since there are multiple dupe char
If we mark every char with their orginal index and keep looping until every char is looped back to it's own index, something may show up
 
Maybe
I'll try that
Although don't forget that itercount is when the string is the same, not when all are back in their original places...
Note: The last digit is always the same...
 
6:56 AM
I know, but if it have something to do with permutation, then different index should not be counted as same string
 
Except the characters are identical... I'll have a look...
 
the answer of restored string could be modified version of index one
 
I feel like indices-in-right-place will give more sensible results...
 
74 messages moved from The Nineteenth Byte
 
Ok...
@hyper-neutrino Thanks!
 
7:06 AM
no problem, have fun with your discussion :)
 
@okie Working on the version which counts indices, give me a bit.
 
okie
 
what is this room about
 
0
A: Sandbox for Proposed Challenges

A usernameSwap encoding code-golfstring Swap encoding is an encoding method where you iterate through a string, reversing sections of it between pairs of identical characters. The basic algorithm For each character in the string: Check: Does the string contain the character again, after the instance you fo...

About the string that will return to it's own state after certain time of being swapped
 
 
1 hour later…
8:22 AM
I've found that if first char equal last char and is unique pair(which means it can't be found on other char that is not first and last)
It will need atmost 2 step to restore
and you can reverse swap by literally doing swap reversed
 
I finally got the order-sensitive one working
And it's even stranger than I expected...
Note: this is for 123123, 123123123, 123123123123 etc
 
ya that's kinda weird
I think the code is somehow wrong
 
You sure?
I'll have a look.
"Wrong" testcase please?
 
for 123123 it should be atleast 4
 
True that is weird
 
8:30 AM
As 4 step is require to atleast have same string
 
Your right
I had a -1 instead of +1 so all off by 2
 
yaaaaa
 
Makes a bit more sense now...
 
123*3 goes from 8 to 48
so there is 42 extra step require for it to get index-correct
 
So it must go through every possible combination.
V inefficient.
 
8:37 AM
4 16 192
5 22 44
6 40 2400
Here's compare between string-wise and index-wise
and 192/16 = 12
44/22=2
 
So some are more efficient than others...
 
2400/40=60
What make those difference? that's interesting question
After a bit of research, if we prove that it's a finite group(which is confirmed for now) and do not loop to other values other then original value, we can say that it will always loop back to original value
So all we need to prove is that every step is unique and don't have dupe
Confusing, after asking others(my math teacher) about this, I've learned that it may have something to do with group action
 
8:54 AM
It would be useful to find out if this was 1-to-1, that is, every single output has exactly one possible input. This would mean no loops.
If it's reversible, then it should be doable...
 
the reversed swap have same property as normal swap I think
 
DISCOVERY: IT IS REVERSIBLE
By passing the string backwards to the swap function, then turning that backwards, you get the string that produced that.
 
Ya i mentioned it in above super long paragrath
I tried to prove it through math
So i think this means that reverse(swap(reverse(string))) will get you -1 step
 
Yeah, you're right.
 
WAIT
THIS PROVE THAT EVERY STRING IS A LOOP
HOLY
 
9:01 AM
I know right
 
so every string is vaild
 
That means every single word will eventually cycle back!
 
!
That's big improvement!
Atleast we are sure that every string have an answer(loop length)
 
BTW while we were chatting my program found the result for "Determine if a dot(comma) program halts" was 59294712.
 
we can make a whole theory base on this question
 
9:05 AM
This is getting overcomplicated.
I'm linking this chat to the sandbox post.
 
I think i will post a complete prove here
 

  last day (34 days later) »