Kolmogorov complexity, informally, is the amount of code it takes to produce a given string of text. When posting a challenge in this category, please make sure it adds something new to the challenges that already exist.

learn more… | top users | synonyms

29
votes
13answers
3k views

Minecraft Mirrored

This is Calvin. Just trying to get 20 rep so this user can chat in the PPCG Minecraft Server chatroom. Write a program or function that takes in a positive integer. If the integer is even (2, 4, 6, ...
34
votes
47answers
4k views

Make the Mexican Wave

In as few bytes as possible, write a program or function that outputs the following: Abcdefghijklmnopqrstuvwxyz aBcdefghijklmnopqrstuvwxyz abCdefghijklmnopqrstuvwxyz abcDefghijklmnopqrstuvwxyz ...
1
vote
1answer
315 views

A Kingdom Hearts VGM challenge

I'm a huge video game music fan. One of my favorite OSTs is that from Kingdom Hearts, by Yoko Shimomura. The challenge Create a program or function that takes two arguments in any format: an ...
30
votes
17answers
5k views

Holy Hole In A Donut, Batman!

Holy Hole In A Donut, Batman! Some characters are more holy than others. Using as few unholy letters as possible, display the statement above. Challenge Write a full program to print Holy Hole In A ...
17
votes
5answers
2k views

ASCII Borromean Rings

The Borromean rings are a curious set of three circles, linked such that the removal of any one of them will unlink the other two: You can make a set for yourself with a couple rubber bands and a ...
21
votes
15answers
3k views

Given the names of two planets, give the distance

Using the following table (source) write some code that takes the names of two planets and returns the distance between them: +-------------------+---------------+ | Planets | Distance (km) ...
4
votes
14answers
2k views

Print the Flag of the Arab Revolt!

It seems flags are a trend now, so what better place to start an account? I thought bars could use a twist to them, so I found this flag. Produce the following in the console output the fewest ...
6
votes
4answers
464 views

Print the Australian Flag!

Here we go again! This is my last flag for now! I originally wanted to do my national flag but I thought the stars were too hard so I posted Print the British Flag! instead, which itself was inspired ...
-4
votes
9answers
276 views

Generate and print the first 20 Fibonacci numbers with the least unique characters

As the title suggests, my task is fairly straightforward: Write a program in your language of choice that will print out the first 20 Fibonacci numbers using the least unique characters. For example ...
12
votes
4answers
443 views

Print out the Smallest Perfect Squared Square

Squaring the Square is a process of tiling a square using only other squares. If this tiling only uses squares of different sizes, then it is considered to be perfect. The smallest possible perfect ...
10
votes
5answers
616 views

Print the British Flag!

Inspired by Print the American Flag! this is a direct copy but with the British flag as it has some symmetries but is still quite complex! Your challenge is to produce the following ASCII-Art in as ...
26
votes
8answers
4k views

Print the American Flag!

Special Independence Day (USA) themed challenge for you today. You must write a program that prints this ascii-art representation of The American Flag. 0 ...
27
votes
19answers
4k views

Leap for Leap Seconds!

Since today marks the occasion of the 26th leap second ever to occur, your challenge will be to output the date and time of every leap second in GMT or UTC that has occurred so far, as well as the one ...
15
votes
2answers
477 views

Golf Your Favorite Minecraft Tool

In Minecraft, the default item textures are all reasonably simple 16×16 pixel images, which makes them seem ideal for golfing. Below are simplified textures of the five "core" diamond tools in ...
77
votes
12answers
4k views

Seven Slash Display

Write a program that takes in a non-empty string of the digits 0 through 9 and prints how they would be shown on a seven-segment display using slashes (/, \). These are the precise digit shapes: /\ ...
1
vote
0answers
157 views

Chaining autograms

Write a program that takes one integer input n and one format letter and outputs n autograms in the format This sentence contains ? "A"s, ? "B"s ... and ? "Z"s. Each question mark ? represents the ...
-3
votes
2answers
220 views

Isn't It Ironic? A Little Too Ironic? [duplicate]

I made a joke the other day and sent it to some friends. One replied back "I love the irony!" and I looked at it and realized there was some irony in it. But that wasn't the irony she saw - the irony ...
10
votes
5answers
457 views

ASCII Art of the Day #4 - Zodiac Signs

We all love horoscopes, don't we? But I have a serious problem in this Horoscope App installed on my Smart Phone that it only displays the icon of the Zodiac Sign for each day's horoscope. Now, I do ...
18
votes
4answers
480 views

Chinese checkerboard

The game of Chinese checkers is played on a board with spaces in the shape of a six-pointed star: Image from Wikipedia We can create an ASCII-art representation of this board, using . for empty ...
12
votes
1answer
541 views

XKCD Bracket Probabilities

Today's XKCD is a sports-tournament style bracket, where the contestants are well-known names, put into groups of possibly confusing names. Give the probability that a given contestant will win the ...
37
votes
13answers
4k views

ASCII Art of the Day #1 - Double Knot

Write a full program or a function that takes a positive integer N as input via STDIN/command line/ARGV or function arguments and prints an ASCII double knot corresponding to the N to STDOUT. The ...
19
votes
6answers
1k views

Thorough though Thoreau threw, Troll throws through tough troughs

To each of these nine confusingly similar words, assign a number 1-9 in any way you like: though through thorough Thoreau throw threw trough tough troll Write a program that takes in a string. If ...
35
votes
13answers
4k views

Me Want Honeycomb

Write the shortest program that prints this ASCII art section of a hexagonal tiling or honeycomb: __ __/ \__ __/ \__/ \__ / \__/ \__/ \ \__/ \__/ \__/ / \__/ \__/ \ \__/ \__/ ...
48
votes
25answers
4k views

Draw An ASCII Double Helix

Write a program that takes in an integer N via stdin or the command line. If N is 0, the single letter O must be printed to stdout. If N is positive, this horizontal ASCII art double helix, drawn ...
31
votes
30answers
3k views

Extendify the ASCII Sun

Write a program that takes in (via STDIN/command line) a non-negative integer N. When N is 0, your program should print O (that's capital Oh, not zero). When N is 1, your program should print \|/ ...
22
votes
35answers
2k views

List all times in the day at a half hour rate

Shortest answer wins. It must be sorted, and in 24hr time. The final line does not have a comma. Output should be as follows: '00:00', '00:30', '01:00', '01:30', '02:00', '02:30', '03:00', '03:30', ...
124
votes
19answers
12k views

Do you want to code a snowman?

Here is a simple ASCII art snowman: _===_ (.,.) ( : ) ( : ) Let's make him some friends. This will be the general pattern for our ASCII art snowpeople: HHHHH HHHHH X(LNR)Y X(TTT)Y (BBB) The ...
17
votes
2answers
347 views

Can you fold a hexomino into a cube?

One of my kid's favorite toys is a set like this. Actually its one of my favorite toys - I've been playing with it and its been giving me some PPCG challenge ideas. Here's one: Write a program or ...
21
votes
5answers
449 views

StickStack Numbers

StickStack is a very simple stack-based programming language with only two instructions: | pushes the length of the stack onto the stack - pops the top two elements from the stack and pushes back ...
49
votes
24answers
5k views

Golf Your Language's Identicon

Identicons are small images of geometric patterns that represent the hash value of a string. Stack Exchange uses the identicons from Gravatar as each user's default avatar image. In this challenge, ...
15
votes
6answers
381 views

Princely Prefix by a Program in Pattern

You should write a program or function which outputs or returns as much of Chapter I of The Little Prince as it can. Your program or function has to be an M-by-N block of code containing only ...
12
votes
1answer
599 views

Two-zero-one-five puzzle

Background This puzzle is a variation on the four fours puzzle (itself the topic of a past question). Like that puzzle, the aim is to find mathematical expressions for different whole numbers, using ...
60
votes
21answers
5k views

Interpreting Fish (no, not that Fish)

Consider these five ASCII art sea creatures: Standard fish: ><> or <>< Speedy fish: >><> or <><< Sturdy fish: ><>> or <<>< Stretchy ...
16
votes
16answers
1k views

Generate MathJax for the Golden Ratio Continued Fraction

In anticipation of MathJax being temporarily disabled, the rendered MathJax in this question has been replaced with images. You are still welcome to post answers but you'll have to view the rendered ...
14
votes
32answers
3k views

Print the first character of the previous answers

The accepted winner is isaacg, with his 7-bit ASCII answer. However, the challenge isn't over yet - this bounty is awarded to the shortest answer. If, somehow, you get all the first characters of all ...
27
votes
11answers
2k views

Official Ruby Inspector

Here is a simple ASCII art ruby: ___ /\_/\ /_/ \_\ \ \_/ / \/_\/ As a jeweler for the ASCII Gemstone Corporation, your job is inspect the newly acquired rubies and leave a note about any ...
7
votes
4answers
652 views

Write an URL compressor

Today your goal is to invent URL compression. You must write two programs: a compressor and a decompressor. The compressor will be called with one URL on stdin and its output will be read on stdout. ...
9
votes
4answers
249 views

Row, Column, Diagonal, Block

Write a square block of code that is N characters wide and N characters tall, for some positive integer N. For instance, your N may be 5 and the block look like this: ThisI sMy5B y5Cod eBloc kOkay ...
21
votes
3answers
887 views

How do I craft that?

There are 21 items in Minecraft that you can craft using only wood and items crafted from wood: axe boat bowl button chest crafting table door fence gate hoe ladder pickaxe ...
10
votes
4answers
425 views

Encoding an URL in brainfuck

Inspired by this question, your goal today is to encode an URL in brainfuck. My browser has been hacked! The location bar has been turned into a brainfuck interpreter. I need a program that turns an ...
11
votes
7answers
586 views

Generate a Brainf_ck program that outputs a string of given length

Your friend is trying to break into a vault that has a peculiar locking system: it requires a certain number of gentle knocks in a particular spot. Your friend discovered the number (which is in the ...
11
votes
3answers
297 views

Golfing every ASCII character in 99

99 is a programming language I invented earlier this week for my challenge Write an interpreter for 99. (Invented but never needed to implement thanks to half a dozen of you. ;) ) The full language ...
7
votes
6answers
660 views

Writing code for three tasks

When you run your program first, it should print an integer sequence. The second run should print the 'Mary had a little lamb' song. The third run should produce an ASCII image file. Scoring Your ...
9
votes
2answers
334 views

ICS Maritime Flag alphabet

The International Code of Signals flag alphabet is used by ships for communication, particularly for static signals. Your challenge is to write a program or function that will take a string from ...
13
votes
1answer
504 views

Write a Kolmogorov Complexity Solver

The Kolmogorov complexity of a string S is the length of the shortest program P, written in some programming language L, whose output is exactly S. (Yes, the real definition is more formal but this ...
15
votes
9answers
1k views

Keep the unique characters down

It's very simple: Your program or function should generate the following text: Elizabeth obnoxiously quoted (just too rowdy for my peace): "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG," giving me a ...
18
votes
21answers
5k views

The Staircase Challenge

Your work is to recreate this piece of art: _____ | | | | _____| ...
8
votes
6answers
318 views

List the Cases of Two Finnish Nouns

Introduction In this challenge, your task is to correctly list the cases of two Finnish nouns. The twist is that you may use one of the listings as a guide to produce the other. The Nouns We use ...
32
votes
8answers
4k views

One hundred passwords

I have one hundred vaults, each one within another. Each vault has a password, consisting of a single number. 95 43 81 89 56 89 57 67 7 45 34 34 78 88 14 40 81 23 26 78 46 8 ...
15
votes
3answers
880 views

Words within words within words within words . . .

In this pixelated font of uppercase letters of the alphabet, all the characters are 5 units wide and 5 tall. ███ ████ ███ ████ █████ █████ ████ █ █ █████ █ █ █ █ █ █ █ █ █ █ ...