Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for WheatWizard‭

Type On... Excerpt Status Date
Comment Post #289679 1. With a normal form of output (e.g. 1 and 0) the set of problems that can be solved is the set of computable decision problems. With halting/non-halting output, the set of problems that can be solved is the set of limit computable decision problems. This includes famously non-computable problems ...
(more)
6 days ago
Comment Post #289679 I'm in opposition to this for two reasons. 1. it is not a trivial change in IO, it is a very fundamental change in what can and can't be done. 2. It is not modular, programs written this way can only be combined as part of larger programs in limited ways.
(more)
6 days ago
Edit Post #289447 Post edited:
Stipulated that the intermediate values must be integers.
about 1 month ago
Edit Post #289447 Post edited:
about 1 month ago
Edit Post #289447 Initial revision about 1 month ago
Question Give the fool's fibonacci sequence
Recently I asked for tips on improving some code-golf of mine. The code was supposed to output every third value of the Fibonacci sequence starting with 2: ``` 2,8,34,144,610,2584,10946,46368,196418,832040 ``` However, I made a mistake in deriving my formula, and my code output a different s...
(more)
about 1 month ago
Comment Post #288535 You don't get to assume a maximum on these values.
(more)
about 2 months ago
Comment Post #288943 The result can be exactly $-1, 0, 1$ if no other residue is one of those three residues (and each of those three occurs at least once). For example look at the example 6. 6 is 0 mod 2, 0 mod 3, 1 mod 5, -1 mod 7. The value 0 occurs twice, this is how you only have 3 values for high $n$.
(more)
about 2 months ago
Edit Post #289152 Initial revision about 2 months ago
Question Reverse engineer the colors for a layout.
At my job we have to sometimes lay out materials. Materials come in large long rolls and are cut into smaller pieces when being laid out. When we order the rolls we draw up a layout document which describes how we are going to cut them and layout the pieces. This tells the manufacturer how we are ...
(more)
about 2 months ago
Edit Post #288943 Post edited:
3 months ago
Comment Post #288943 No, the set needs to be exactly equal to, not just a subset of.
(more)
3 months ago
Edit Post #288943 Initial revision 3 months ago
Question Find near miss prime multiples.
Given a number $n \geq 3$ as input output the smallest number $k$ such that the modular residues of $k$ by the first $n$ primes is exactly $\{-1,0,1\}$. That is there is a prime in the first $n$ primes that divides $k$, one that divides $k+1$ and one that divides $k-1$, and every prime in the firs...
(more)
3 months ago
Comment Post #288885 Ah thanks. I blame me missing that on the fact I was expecting to see a numeral.
(more)
3 months ago
Comment Post #288885 You should probably mention that dice have 6 faces, currently it has to be intuited from test cases.
(more)
3 months ago
Edit Post #288689 Initial revision 3 months ago
Question Prove commutativity on this monoid presentation.
Given two binary strings $A$ and $B$ such that $A$ is an anagram of $B$, output a third binary string $S$ such that both $A$ and $B$ can be created by iterated removals of the substring $10101$ from $S$. For example for $A=100$ and $B = 010$, one solution is $S = 10101010$ since $$ (10101)01...
(more)
3 months ago
Comment Post #283305 Haskell + [hgl](https://gitlab.com/wheatwizard/haskell-golfing-library), 2 bytes: `lq`
(more)
3 months ago
Edit Post #288684 Initial revision 3 months ago
Answer A: Cumulative Counts
Haskell + hgl, 10 bytes ```haskell mpn$ce<gj ```` Attempt This Online! Explanation - `mpn` map across all non-empty prefixes of the input ... - `ce` count the number of elements in each prefix equal to ... - `gj` the last element of that prefix. Reflection I'm happy with this. ...
(more)
3 months ago
Comment Post #288683 That big O notation simplifies to $O(n^2)$.
(more)
3 months ago
Edit Post #288653 Initial revision 3 months ago
Answer A: Build a replacement ball in regex.
Haskell + hgl, 30 bytes ```haskell ic"|"<pST<eL<P1 ``` This version is much longer, but in my opinion it has better potential to be shorter than the above version if hgl were improved. Explanation This adds a dummy character `?` to the front of the list then gets all ways to partition t...
(more)
3 months ago
Comment Post #288548 Ok, I should have seen that. I'm going to suggest adding a rounded up dummy score for the time being, and then to fix the leaderboard. I'll edit my answer in a bit.
(more)
3 months ago
Edit Post #288622 Post edited:
Better wording.
3 months ago
Edit Post #288622 Post edited:
3 months ago
Edit Post #288622 Post undeleted 3 months ago
Edit Post #288622 Post deleted 3 months ago
Edit Post #288622 Initial revision 3 months ago
Question Are these reduced forms of the same thing?
Task You are going to take three strings as input $A$, $B$ and $X$. And your goal is to determine if there exists a third string $S$ such that both $A$ and $B$ can be formed by iteratively removing contiguous instances of $X$ in $S$. For example if $X = 10101$ then both $10$ and $01$ can be forme...
(more)
3 months ago
Edit Post #288563 Post edited:
3 months ago
Edit Post #288563 Initial revision 3 months ago
Question Build a replacement ball in regex.
In this challenge you will take a number $n$ and a string $X$ of length $\geq n$, and produce a regular expression which matches all strings that are withing $n$ character substitutions of $X$. Specifically you will take $X$ and $n$ and ouptut all the ways to replace exactly $n$ characters with th...
(more)
3 months ago
Edit Post #288555 Post edited:
3 months ago
Edit Post #288555 Initial revision 3 months ago
Answer A: Efficient censorship
Haskell + hgl, 14 bytes ```haskell xBl<fn<iw ```` Attempt This Online! Explanation `ss` gets all substrings of the input `fn` filters out the substrings that don't ... `iw` checks if the forbidden word is a contiguous substring `xBl` gets the largest result Reflection There...
(more)
3 months ago
Comment Post #288548 Actually the leaderboard currently floors the fractional score so there's no use in making a dummy score. I've changed my suggestion to "update the leaderboard to support how people are scoring".
(more)
3 months ago
Edit Post #288548 Post edited:
3 months ago
Comment Post #288548 In the last section I'm suggesting that if the leaderboard is not changed, we include a dummy count so the leaderboard scores it predictably. I'll try to reword it.
(more)
3 months ago
Comment Post #288548 Maybe I am no expressing myself most clearly. I am saying that the in effect disalllowing and allowing fractional bytes are not tangibly different. I assume the leaderboard doesn't change because it illustrates this point most expressly.
(more)
3 months ago
Edit Post #288548 Post edited:
3 months ago
Edit Post #288548 Initial revision 3 months ago
Answer A: Codidact Fractional Byte Consensus
I'm going to reiterate and build off ideas I laid out on this post on PPCG. First let's point out that at current the leader board does not support fractional scores. In this answer I am going to assume this is unchanged. That may prove to be false, in fact I think it is likely a false assumption,...
(more)
3 months ago
Edit Post #288535 Initial revision 3 months ago
Question Efficient censorship
You are a low-level censor working for the Ministry of Media Accuracy. Part of your job is to make sure that certain words don't appear in publications. Every morning you get a fresh stack of next week's newspapers and its your job to comb through them and fix any of the words that were mistakenly i...
(more)
3 months ago
Comment Post #288526 Thanks I fixed it. And it seems the new alignments are golfier since the fixed program comes out 2 bytes shorter.
(more)
3 months ago
Edit Post #288526 Post edited:
Fixed alignment
3 months ago
Edit Post #288526 Post edited:
Improved score.
3 months ago
Edit Post #288526 Post edited:
3 months ago
Edit Post #288526 Initial revision 3 months ago
Answer A: Connect the corners without 4 in a row
Haskell + hgl, 134 bytes ```haskell k=cy"X.XX" x#1=[4,0,9,9]!x 2#y=8 3#y=[8,9,4,4]!y x#3=[0,3]!x #=0 x?y|(n,j)<-fvD 4$x%4#(y%4)=tk y$dr j$tk x<dr n<cy[dr2 k,k,cy".X",k] ```` Attempt This Online! I first set up a pretty dense background pattern which doesn't break any rules: ``` X...
(more)
3 months ago
Edit Post #288516 Post edited:
3 months ago
Edit Post #288516 Initial revision 3 months ago
Question Calculate the Z-array
Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Yi$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if the input is ``` [1,2,2,1,1,2,1,2,2,1,2,1] ``` The output should be ``` [12,0,0,1,2,0,4,...
(more)
3 months ago
Edit Post #288398 Post edited:
More examples.
3 months ago
Edit Post #288503 Initial revision 3 months ago
Question Count polyomino bisections
An polyomino is a non-empty connected subset of the square tiling consisting of squares joined along their edges. We will not require that polyominos be simply connected, that is they can have holes. A bisection of a polyomino $X$ is a pair of polyominos such that they can be joined together witho...
(more)
3 months ago
Edit Post #288398 Post edited:
Holes.
3 months ago
Comment Post #288398 The current definition of polyomino doesn't disallow holes. I'll try to work that explicitly into the text.
(more)
3 months ago
Edit Post #288398 Post edited:
3 months ago
Comment Post #288398 Ah I think you are misunderstanding, the you are dividing it into k-polyominos. There are no additional requirements on these polyominos. So ```text X XX XXXXX ``` can be subdivided into a T-tetramino and a O-tetramino. It doesn't matter that these are not the same 4-polyomino. You just ...
(more)
3 months ago
Comment Post #288398 I'm not sure what you mean. There's no canonical way to select an enantiomorph, so yes it is possible for to mirror images to be inputs, if that's what you are asking. No part of this question involves determining if two polyominos are equal so it shouldn't matter whether you consider chiral pairs t...
(more)
3 months ago
Comment Post #288398 Input a polyomino is intended to be flexible. I'd be certainly be willing to let you take a list of coordinates, and I believe if taking a list it is acceptable to also take its length. So that would be one way to take the input with the number of squares.
(more)
3 months ago
Edit Post #288398 Initial revision 3 months ago
Question Determine if a polyomino is "prime"
An $n$-polyomino is a connected subset of the square tiling consisting of $n$ squares. We will not require that polyominos be simply connected, that is they can have holes. We will say a $n$-polyomino is prime if it cannot be disected into disjoint $k$-polyominos for any 1<$k$<$n$. For example th...
(more)
3 months ago