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
48
votes
14answers
6k views

Who was president of the USA?

Challenge Write a program that takes as input a day from April 30, 1789 to August 21, 2019 and returns as output who was president of the USA that day. Notes For the list of US presidents, the ...
34
votes
16answers
6k views

Count to 100 in Danish

Print all the numbers from 0-100 in the right order using the Danish way of counting How they count Like English, they have dedicated words for 0-20, 30, 40 and 100 Instead of saying ...
63
votes
19answers
7k views

Just repeat yourself

Write a program that outputs Do not repeat yourself! Your program code must respect the following constraints : its length must be an even number each ...
90
votes
48answers
13k views

In Honor of Adam West

Adam West passed away, and I'd like to honor his memory here on PPCG, though I doubt he knew of our existence. While there are many, many different things that this man is known for, none are more ...
38
votes
37answers
7k views

Print all 2 letter Scrabble Words

The Challenge: Print every 2 letter word acceptable in Scrabble using as few bytes as possible. I have created a text file list here. See also below. There are 101 words. No word starts with C or V. ...
-4
votes
2answers
194 views

Feliz navidad prospero año [duplicate]

UP So christmasSSSSSS is coming and carols are on the radio all day. Jose Feliciano's Feliz Navidad song is a good example of this. Your task is to print the entire (and repetitive) song. Lyriiiiiics:...
81
votes
136answers
12k views

Print a Tabula Recta!

Print a Tabula Recta! The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere ...
22
votes
67answers
6k views

Display numbers lacking 2's

Display numbers from one to one-hundred (in increasing order), but number 2 shouldn’t appear anywhere in the sequence. So, for example, the numbers two (2) or ...
27
votes
31answers
2k views

Output the list of musical notes

This task is simple: Write a program or function that outputs the list of all musical notes (using English note names) from A♭ to G♯. All notes without a name consisting of a single letter (i.e. ...
43
votes
62answers
7k views

The Real Slim Shady

Echo the following in as few bytes as possible: ...
36
votes
45answers
5k views

A crowd of blank stares

Problem Given no input write a program or a function that outputs or returns the following string: ...
32
votes
21answers
5k views

Telephone number in spoken words

Goal Write a program or function that translates a numerical telephone number into text that makes it easy to say. When digits are repeated, they should be read as "double n" or "triple n". ...
44
votes
122answers
13k views

Output programming language name

Challenge: In the programming language of your choice, take no input and output your programming language's name. Fair enough, right? Restrictions: You can't use any character that is included in ...
26
votes
28answers
3k views

Row, row, row your boat

Everyone is likely familiar with the following song, which is a musical round: Background Fewer people might recall trying to sing the 4-person version of this with a few friends and failing. ...
409
votes
748answers
123k views

“Hello, World!”

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
36
votes
42answers
6k views

Every word from babab to zyzyz

Your task is to write a program that will output a readable list of every five letter words with the structure: consonant - vowel - consonant - vowel - consonant The output should be sorted ...
38
votes
203answers
11k views

Print numbers from 1 to 10

This might be a very simple challenge, but I am surprised it hasn't been done on code-golf yet: Print all Integers from 1 to 10 inclusive in ascending order to standard output. Your output format ...
126
votes
30answers
17k views

A keyboard so real you can almost TASTE it

... Not that you would, would you? The task is simple, output the following text: ...
71
votes
140answers
15k views

“99 Bottles of Beer”

Write a program that outputs the lyrics to 99 Bottles of Beer, in as few bytes as possible. Lyrics: ...
33
votes
11answers
1k views

What song is playing?

Inspired by this xkcd You work for Shazam and they have a project for you. Some customers are complaining about their app taking up too much space on their phone, so they want you to code a lite ...
45
votes
56answers
6k views

There are known knowns

Former US Secretary of Defense, Donald Rumsfeld, famously popularized the phrase "known knowns." Here we're going to distill his remarks into a four-line stanza. Specifically, output this text: <...
14
votes
17answers
773 views

Print a layered cake

Challenge Given an input n, print an ASCII art cake n layers tall, viewed from the side, with two candles on top. Refer to the ...
21
votes
33answers
6k views

Print the Russian Cyrillic alphabet [duplicate]

Apparently, we really like printing the alphabet in different languages. How about the Russian Cyrillic alphabet? Print/output/return this exact text (trailing whitespace is permitted) ...
42
votes
41answers
3k views

A Programming Puzzle of Mode Golf

Your task is to print the text Good morning, Green orb!, with every character repeated in place as many times as the most frequent byte in your source (the mode). ...
146
votes
257answers
38k views

1, 2, Fizz, 4, Buzz

Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
36
votes
7answers
3k views

List of Python versions

Python is the fastest-growing major programming language today. It is the most wanted language for the third year in a row, meaning that developers who do not yet use it say they want to learn it.[1] ...
13
votes
18answers
22k views

Walkers Join! - Alan Walker's logo

You might know Alan Walker from his ever popular song Faded. Now his "followers" are called Walkers and they have a logo, here is a simplified version: ...
67
votes
58answers
15k views

Sing Baby Shark

"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - ...
23
votes
26answers
3k views

There Was an Old Lady

Your goal is to write a program that prints the following poem exactly as it appears here: ...
14
votes
19answers
6k views

Say “Hello” to the world in ASCII art

Challenge: Produce the following output using as few chars as possible: ...
251
votes
63answers
70k views

We're no strangers to code golf, you know the rules, and so do I

Write the shortest program that prints the entire lyrics of "Never Gonna Give You Up" by Rick Astley. Rules: Must output the lyrics exactly as they appear in the above pastebin*. Here's the raw dump:...
19
votes
3answers
5k views

Draw ASCII Playing Cards

Consider these 15 ASCII playing card patterns (ace through Joker, and the back side), where X is a placeholder for the suit symbol: (they look better with less line ...
33
votes
9answers
3k views

Who's that Pokémon?

Input: an integer N between 1 and 151 Output: the Nth Pokemon. Rules You may use one data file. You may not use any already made data decompression algorithms. This includes libraries and other ...
45
votes
45answers
13k views

Print “N NE E SE S SW W NW”

This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific ...
37
votes
44answers
7k views

Kolmogorov shifter

Output or display the following three lines of text, exactly as they are shown below. A trailing newline is accepted. ...
7
votes
4answers
907 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. ...
49
votes
29answers
10k views

Print the phrase “And she said, 'But that's his.'” using only the alphabet

Print the phrase And she said, 'But that's his.' using only the following characters: ...
40
votes
22answers
6k views

Print the Periodic Table

Your challenge is to print/output/return this text: ...
0
votes
1answer
155 views

Find 77 7-letter Magic Words [closed]

A magic word is a word whose Braille spelling contains precisely 26 dots (because the Morse code alphabet can be circularly encoded within). For example: ...
92
votes
12answers
8k views

Proving that a Russian cryptographic standard is too structured

The aim of this challenge is to find an impossibly short implementation of the following function p, in the langage of your choosing. Here is C code implementing it ...
47
votes
88answers
7k views

Alphabet triangle

You are to print this exact text: ...
29
votes
4answers
2k views

Print the new site header

The new site header has some bits of source code from various questions as the background. Here are the first 3 lines: ...
-5
votes
13answers
223 views

Bootstrap JSF**k

In Javascript you can recover the complete language using only the symbols ()[]!+. Here's the basics: ...
10
votes
4answers
1k views

Pigpen Cipher Encryption

Pigpen Cipher Encryption Your mission is simple: to write a program which receives text as input and outputs an ASCII representation of it in the Pigpen Cipher. Input ASCII-only (no Unicode) ...
17
votes
22answers
2k views

Displaying n with n

What I want: Quite simply, I want a text based display, that asks for an input, n, then shows that value on the display! But there's a catch. Each of the 'true' '...
-6
votes
2answers
245 views

Output the Wikipedia article for Kolmogorov Complexity

Your job is to output the html of the current version (at the time of this writing) of the Wikipedia page for Kolmogorov complexity: https://en.wikipedia.org/w/index.php?title=Kolmogorov_complexity&...
51
votes
43answers
7k views

Print all ASCII alphanumeric characters without using them

Challenge Print the following characters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 The catch is that you may not use any one of them in ...
16
votes
47answers
4k views

Greeting The User

Create a program which when run displays the text below: )-*-*-*^_^*-*-*-( | Welcome User! | )-*-*-*^_^*-*-*-( Use any functions or language to answer this, have ...
23
votes
16answers
3k views

Bake me a slice of cake

My birthday is in a month, and this is a slice of tasty cake. ...
-6
votes
2answers
306 views

This ain't it Chief

This is mostly for the memes. I regret existing. Rules Your code has to output, by either printing or showing in stdout, the phrase This ain't it Chief. in that ...