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.

Filter by
Sorted by
Tagged with
25 votes
14 answers
3k views

Print every Fool's Mate

In chess, the Fool's Mate is the fastest possible way to reach checkmate. It is reached with Black's second move. In chess notation, one possible sequence of moves that achieves Fool's Mate is ...
  • 742
26 votes
12 answers
5k views

Was it a King or a Queen or neither?

Input A calendar year from 927 to 2022. Output You can use any three distinguishable outputs. As an example, “K” (short for King) or “Q” (short for Queen) depending on which of the two England had in ...
  • 1,101
23 votes
5 answers
3k views

Write a program with the smallest width

Print or return the following text: Hello world! The quick brown fox jumps over a lazy dog. However, your submission will not be scored in bytes. Instead, ...
  • 12.9k
15 votes
17 answers
2k views

The second even sublime number

easy mode of my previous challenge A perfect number is a positive integer whose sum of divisors (except itself) is equal to itself. E.g. 6 (1 + 2 + 3 = 6) and 28 (1 + 2 + 4 + 7 + 14 = 28) are perfect. ...
  • 66.1k
31 votes
29 answers
5k views

A challenge for rookies

Print or return the following string: ...
  • 12.9k
26 votes
15 answers
3k views

All Possible Ties in Tic-Tac-Toe

Your task is to output all possible ways to end a game with a tie (all rows, columns, and diagonals are completely filled and do not have 3 X's or 3 O's, and there are exactly 5 X's and 4 O's in total)...
  • 2,151
30 votes
9 answers
5k views

Draw the USA flag

I noticed that it seems nobody has posted a non-ASCII (related) USA flag challenge yet, so what better time than the 4th of July? The Challenge Draw the current (as of 2022) flag of the United States ...
  • 3,380
18 votes
6 answers
808 views

Draw this fractal generated by applying Newton's method to cosh(x) - 1

I came across this picture the other day: (Credit to Josep M Batlle I Ferrer) Your job is to generate this picture. This graph is generated by repeatedly applying newton's method to the graph of: $$f(...
  • 2,843
10 votes
4 answers
486 views

Draw the Progress Pride flag

Challenge Create the image of a progress pride flag. Output Dimensions Rules Your program must create the image and not just load it from a website The colours can be just your language's default ...
  • 337
13 votes
16 answers
2k views

Bloons TD 6 Upgrade Paths

Background The monkeys need help organizing their defense and have asked you, Benjamin the code monkey, to create a program that will list all tower upgrade options. Each tower has three unique ...
  • 11.2k
24 votes
67 answers
4k views

Print the ASCII Code page

Goal You have to print the ASCII printable characters' code page (0x20-0x7E). The output should look like this: ...
  • 433
13 votes
10 answers
1k views

Compress Jelly's code page

In this challenge, you'll print out the SBCS of Jelly, a popular golfing language. Its code page looks like this: _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F 0_ ...
18 votes
10 answers
1k views

Position from atomic number in the periodic table

Let us consider the following representation of the periodic table. ...
  • 321
12 votes
5 answers
496 views

Whyte Notation Translator

Whyte Notation is a classification method mainly for steam locomotive, that classifies by wheel arrangement. On a steam locomotive ( we're only focusing on non articulated locomotives here ), the ...
19 votes
29 answers
4k views

Generate All 8 Knight's Moves

Introduction In chess, Knights can move two squares in one direction, and then one square in an orthogonal direction. On an x/y plane, these can be thought of as being a relative change of coordinates,...
  • 190
19 votes
8 answers
2k views

Convert Alpha-3 to Alpha-2

I've been developing some programs involving me fetching a vector from a url using Alpha-2 country codes (such as GET /jp.svg for Japan). Except, oh no! All the ...
  • 451
2 votes
2 answers
298 views

Draw New Posts' Profile!

New Posts and New Sandbox Posts are chatbots that occupy CGSE's main chatroom, The Nineteenth Byte. They've been doing their jobs for almost one full year now, so I thought I'd make a challenge to ...
  • 3,500
16 votes
7 answers
706 views

Translate Text into Matoran

The Matoran Alphabet is the alphabet used by many of the characters in the Bionicle universe. Your challenge is to create a program or function that takes a string as input and creates an image of ...
26 votes
28 answers
4k views

What's the Missing Code? (Cops)

Cops' Challenge Robbers' challenge here. It has now been four days since the challenge was posted so all new answers should be marked as non-competing in the title. These answers can still be cracked ...
  • 837
-1 votes
5 answers
284 views

Output this string from the `kolmogorov-complexity` tag info page [closed]

kolmogorov-complexity is one of the tags on this site, representing challenges that test how much code is needed to output a given fixed result (usually a piece of text). The info page for this tag ...
  • 1,749
78 votes
62 answers
12k views

Draw the Ukrainian Flag

As you will probably know, there is a war going on in Ukraine. I noticed that it seems nobody has posted a Ukrainian flag challenge yet, so I thought I'd do it myself in support of Ukraine. The ...
  • 3,500
15 votes
4 answers
537 views

Output a Steiner quadruple system

A Steiner quadruple system \$SQS(n)\$ is a collection of subsets (blocks) of size 4 of a set \$S\$ of size \$n\$ such that every subset of \$S\$ of size 3 is in exactly one block. It is easy to show ...
3 votes
7 answers
652 views

Don't output the file

This rar file, when decompressed, gives a 65024-byte exe file. Requiring you to output the contents of that file would be ...
  • 13k
9 votes
8 answers
549 views

Biggest katlani noun dictionary in 400 bytes

Katlani is a constructed language being designed in chat. In this challenge, your goal is to print the largest dictionary of katlani nouns possible in 400 bytes or less. Task In 400 bytes or less, ...
17 votes
14 answers
867 views

Replicate "dotnet ef" unicorn

.Net Technology is an incredible framework with marvellous functionalities, and among all of them, the most important one obviously stands out: Yep, your simple task is create a program that when it ...
12 votes
10 answers
819 views

From code to golf (Cops' thread)

This is a cops-and-robbers challenge, the robbers' thread is here You can change the word code into golf by changing a letter at ...
  • 31.9k
1 vote
6 answers
247 views

Code Golf Birthday Cake

Your task is to print this exact text: ...
  • 3,129
31 votes
12 answers
2k views

Golf Conway's Primordial Still-Life

Background Note: This configuration was co-found by one of our fellow code golf enthusiasts, Zgarb A 29 year old conjecture by John Conway about the Game of Life was recently solved. To quote Conway ...
  • 29k
13 votes
4 answers
470 views

Encode Antarctic claims

Seven countries lay official claims to parts of Antarctica: Argentina, Australia, Chile, France, New Zealand, Norway, and the United Kingdom. We will focus only on the claims of the main Antarctic ...
  • 22.6k
16 votes
15 answers
1k views

Loading Circle Animation

Loading Circle Animation Challenge Write a full program that takes no input (or has an unused input) that displays exactly the following ASCII animation for as long as possible or only 8 frames. Frame ...
  • 2,151
25 votes
20 answers
972 views

Kolmogorov-simple numbers

If you visit Code Golf often, you may have heard of Kolmogorov complexity. It's usually defined as the amount of bytes required to express some string in a programming language. Here the Kolmogorov-...
  • 6,775
7 votes
2 answers
168 views

In as few bytes as possible in t-sql, return 100 rows containing the phrase 'Have a great Christmas'

In as few bytes as possible in t-sql, return 100 rows containing the phrase 'Have a great Christmas' 92 (I think) to beat :D ...
25 votes
31 answers
3k views

Generate the Chess Numbers™

I was browsing Stack Overflow when I saw this post in Puzzling in the hot network questions and decided to make a challenge out of it (all credit goes to the creator of the challenge). Overview A ...
  • 3,745
19 votes
15 answers
2k views

Euler's numerus idoneus

Euler's numerus idoneus, or idoneal numbers, are a finite set of numbers whose exact number is unknown, as it depends on whether or not the Generalized Riemann hypothesis holds or not. If it does, ...
12 votes
16 answers
942 views

Generate all \$3\times 3\$ magic squares

Though challenges involving magic squares abound on this site, none I can find so far ask the golfer to print / output all normal magic squares of a certain size. To be clear, a normal magic square of ...
  • 223
19 votes
16 answers
2k views

Make me a shape

The game shapez.io has a huge variety of shapes you can produce, such as: Each shape has a unique short code, for example the above is CrWbScRu. This means, going ...
  • 31.9k
25 votes
8 answers
5k views

Make a Hello World using as many bytes as possible

Write a program that outputs the exact string: jan ale o, toki! ("Hello, world" but in toki pona to prevent builtins.) with an optional trailing newline. ...
  • 90.4k
27 votes
10 answers
5k views

Distances between keys on a QWERTY keyboard

Inspired by this video by Matt Parker The distances between the letter keys of a QWERTY keyboard are somewhat standardised. The keys are square and both the horizontal and vertical spacing are 19.05mm ...
  • 22.6k
7 votes
33 answers
2k views

Custom Rows of Smileys Triangle

This problem is inspired from shinh's problem. Given an input of positive integer \$n\$, output a smiley triangle (see below) with \$n\$ rows. Detailed rules Can be either a function or a full ...
's user avatar
27 votes
7 answers
2k views

Happy Birthday... caird coinheringaahing? ChartZ Belatedly?

When this question was posted, it was caird coinheringaahing's birthday! (source: 1, 2, 3, 4) (It was also World Emoji Day.) As a bit of some CGCC lore, caird's name came from a Jelly answer by Dennis ...
  • 40.3k
8 votes
27 answers
3k views

Generate this huge right triangle

Your task is to print out this exact text: ...
  • 163
24 votes
31 answers
2k views

Create a Pride Flag

Challenge Create the image of a pride flag (rainbow flag), i.e. a six coloured striped flag (from top to bottom): red, orange, yellow, green, blue, and violet. Output Example (R) ...
  • 341
15 votes
17 answers
1k views

Print the last answerer's first submission

In this challenge, your past self comes back to help or hurt someone else! The task is simple: write a full program, not a function, that prints the first code submission on this site submitted by the ...
  • 1,477
12 votes
25 answers
1k views

CGCC sings a song together

This is a code-shuffleboard answer-chaining challenge, where the answers will aim to, together, output the lyrics to this beloved 80s song. This is the full lyrics of the song, line by line. The ...
2 votes
15 answers
2k views

Drawing the Stack Overflow logo

From here. Every new game is the first day of the month, 12:00 PM UTC. The goal is to create the Stack Overflow logo using ASCII characters. It looks like this. The exact output should look like this:...
's user avatar
8 votes
5 answers
397 views

Print the Najdorf Sicilian

The Najdorf Variation of the Sicilian Defence is an opening often played at the highest level of chess. It is named after GM Miguel Najdorf and is known for being extremely sharp and theory heavy. ...
  • 1,399
23 votes
74 answers
4k views

Compose a song, line by line

It's time for CGCC to demonstrate our musical talent! In this challenge, you're going to compose songs while keeping your byte count as small as possible. On Day 0, multiple answerers will post a ...
  • 2,528
59 votes
78 answers
12k views

Implement Minceraft

Introduction The game Minecraft has a 1 in 10000 chance of showing "Minceraft" instead of "Minecraft" on the title screen. Your challenge Your challenge is to code a function or ...
  • 31.9k
9 votes
5 answers
723 views

Sr. 4Der says make this shape! (Episode 1)

Dialogue by a 3Der. I was hired by Sr. 4Der to learn the 4D universe and I was willing to get to know more about it. But since I am a 3Der, I wouldn't see him, nor would I know how the real shapes ...
's user avatar
62 votes
55 answers
5k views

Removing The Nineteenth Byte

Introduction The Nineteenth Byte is CGCC's official chatroom (go check it out!). Its name is a play on the nineteenth hole, and it also refers to golf, which is appropriate for CGCC's chatroom's name. ...
  • 5,976

1
2 3 4 5
14