Questions tagged [kolmogorov-complexity]
Kolmogorov complexity, informally, is the amount of code it takes to describe or produce a constant object, such as a string or image. When posting a challenge in this category, please make sure it adds something new to existing challenges.
723 questions
18
votes
18
answers
1k
views
Peg solitaire starting position
Write a program/function to output a peg solitaire board in its starting position:
● ● ●
● ● ●
● ● ● ● ● ● ●
● ● ● ○ ● ● ●
● ● ● ● ● ● ●
● ● ●
● ● ●
...
23
votes
6
answers
2k
views
Chinese periodic table of elements (元素周期表)
In Chinese, each chemical element is named with one Chinese character.
(A brief history of the chemical element naming in Chinese can be looked up in Wikipedia.)
Your goal: Print a periodic table of ...
19
votes
14
answers
2k
views
Output 200 words
Output any 200 words from Wordnik without using external sources. Any case. No repeated or extra words. Code golf.
9
votes
3
answers
515
views
Shortest Brainf*ck program that loads prime numbers into memory
Write the shortest Brainfuck program that loads all primes below 256 into memory consecutively. All other cells must be zero.
You may place them in whatever order you like, but they must be ...
4
votes
3
answers
626
views
Draw a hex grid of a given size
Your task is to draw a requested number of cells in a flat-topped/pointy-sided hex pattern. Each cell is 5 characters high and 8 characters wide (4 characters wide at the top and bottom).
This is a ...
16
votes
9
answers
1k
views
Chisanbop complexity
Chisanbop is a simple method of counting from zero to ninety-nine on two hands invented by Sung Jin Pai and revised by his son Hang Young Pai.
To make numbers, zero, one, or more digits are raised, ...
24
votes
25
answers
2k
views
Output the 32 points of the compass
The 32 points of the compass are:
N, NbE, NNE, NEbN, NE, NEbE, ENE, EbN, E, EbS, ESE, SEbE, SE, SEbS, SSE, SbE, S, SbW, SSW, SWbS, SW, SWbW, WSW, WbS, W, WbN, WNW, NWbW, NW, NWbN, NNW, NbW
(SEbE is ...
7
votes
2
answers
329
views
Fitch Proof of \$(p\Longrightarrow q)\iff\lnot p\lor q\$ with least amount of steps
In the smallest amount of steps, prove
$$(p\Longrightarrow q)\iff\lnot p\lor q$$
We base the proof system on this website. The related functionalities are:
Assumption. Assume that some statement is ...
16
votes
8
answers
2k
views
Draw all 11 cube nets
There are 11 ways of flattening a cube onto a flat surface, like a piece of paper, which can then be folded back up into a cube. Each of these is called a cube net.
Your task is to write a program or ...
3
votes
2
answers
549
views
9 Queens and 1 obstacle
Position 9 queens and 1 obstacle on an 8×8 chessboard so that no two queens threaten each other. Obstacles between two queens prevent them from threatening each other.
For example here is a solution (<...
27
votes
24
answers
5k
views
Draw the Flag of Greenland
The flag of Greenland consists of two red sections and two white sections. I'll provide a diagram below, but also give a textual description. The background of the flag is a rectangle that is 18 units ...
11
votes
13
answers
3k
views
Five Hundred Cigarettes
This is a cigarette.
_
//
//
//
°
This is two (2) cigarettes.
__
///
///
///
°°
This is three (3) cigarettes. The ...
24
votes
10
answers
3k
views
Play the Final Fantasy Prelude
Play the initial section of the Final Fantasy Prelude. This is a 4-octave up-down arpeggio of the following chords:
Cadd2, Amadd2, Cadd2, Amadd2, Fadd2, Gadd2, G♯maj7, A♯maj7
Rules:
Actual sound must ...
10
votes
17
answers
2k
views
Is it an option for the ls utility specified in POSIX.1-2017?
The ls utility lists specified directory content. It is infamous for stupidly lots of options which is known for anti-pattern design of implementing software.(...
10
votes
14
answers
956
views
Looping counter extended
The looping counter is a challenge that prints an infinite number of lines. The first line has one *, the next line has one more ...
6
votes
4
answers
866
views
Sith TIE-Fighter
Today is May 5th which means it's Star-Wars Day episode II: Revenge of the 5th.
For this task, you will output the following image of a Sith TIE-fighter:
...
5
votes
9
answers
3k
views
nimi ale lon toki pona! (Every word in Toki Pona!)
"nimi ale lon toki pona" is a song by YouTuber jan Misali which lists 137 common words in the constructed language Toki Pona. This challenge is not a duplicate of "How high can you ...
20
votes
25
answers
5k
views
First person to ever beat Classic Tetris
Historic Tetris Achievement
Blue Scuti became the first ever human to beat the classic game of Tetris on NES.
Here's the Tetris Kill Screen
Challenge
Output the following Tetris ...
-3
votes
2
answers
325
views
Forward foo, reverse bar, but avoid dead code [closed]
So simple: Provide some code that outputs foo and with the reversed source outputs bar. But before you come up with something ...
0
votes
17
answers
1k
views
Smallest integer \$n\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$
Write code that outputs the smallest integer \$n > 5\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$. Your code may have at most one digit in its source code. You can use ...
24
votes
49
answers
4k
views
Print the Christmas alphabet
Write a program to print or return one of these strings verbatim:
abcdefghijkmnopqrstuvwxyz
ABCDEFGHIJKMNOPQRSTUVWXYZ
Notice that there is no L.
11
votes
37
answers
4k
views
Print ASCII building
Challenge
Display to the screen or write to stdout this exactly:
...
14
votes
7
answers
1k
views
Generate Conway's Atomic Elements
Background
The look-and-say sequence begins with \$1\$, each following term is generated by looking at the previous and reading each group of the same digit (eg. \$111\$ is three ones, so \$111 \...
9
votes
16
answers
2k
views
Calculate the aspect ratio of the Nepal flag
Above is the picture of the flag of the country Nepal. Pretty cool.
What's cooler, is the aspect ratio, which is defined under the constitution as:
That formula in copyable form:
$$ 1 : \frac{...
24
votes
30
answers
4k
views
"Print this diamond" gone beautifully wrong
Write a function (or a whole program) that outputs (or prints) the following ASCII art:
Output:
...