Questions tagged [compression]

Use this tag for questions about encoding information using fewer bits than the original representation.

Compression involves encoding information using fewer bits than the original representation.

Compression can be lossless or lossy. Lossless compression reduces bits by eliminating statistical redundancy so that no information is lost. Lossy compression reduces bits by removing unnecessary or less important information.

The process of reducing the size of a data file is often called data compression. In the context of data transmission, it is called source coding, which is encoding done at the source of the data before it is stored or transmitted. Source coding should not be confused with channel coding, for error detection and correction, or line coding, the means for mapping data onto a signal.

Compression is useful because it reduces resources required to store and transmit data. Computational resources are consumed in the compression process and, usually, in the reversal of the process (decompression). Data compression is subject to a space-time complexity trade-off. For instance, a compression scheme for video may require expensive hardware for the video to be decompressed fast enough to be viewed as it is being decompressed, and the option to decompress the video in full before watching it may be inconvenient or require additional storage. Design of data compression schemes involves trade-offs among various factors including the degree of compression, the amount of distortion introduced (if using lossy data compression), and computational resources required to compress and decompress the data.

101 questions
9
votes
4 answers

Compressing the primes using simple addition?

Consider the sets of integers $$ A = \{1, 3, 7, 13, 27\} \\ B = \{4, 10, 16, 40, 100\} $$ Elementwise addition of sets $A, B$ looks like $A + B := \{ a + b: a \in A, b \in B\}$. Now elementwise-add them to form $A + B$. Here is the…
6
votes
2 answers

Power values of polynomial

$f(x) = a_0 + a_1 x + a_2 x^2 + \dots + a_n x^n$ is a polynomial of degree $n$ with positive integer coefficients. Primary problem statement: Is the Exponential Diophantine Equation $f(f(a) + 1) = y^m$ solvable in integers $y, m \geq 2,…
5
votes
1 answer

Spare storage of a tree

I can store any undirected simple graph N vertices using $b = (N-1)N/2$ bits, by creating a mask of the edges on the upper diagonal of the adjacency matrix. For example the adjacency matrix of $K_3$ is $$ A = [[0,1,1],[1,0,1],[1,1,0]] $$ which can…
Hooked
  • 6,495
  • 1
  • 38
  • 59
4
votes
4 answers

What is the maximum number of primes that I can pack in a 30KB text file?

If I store in trivial way I can store roughly 5100 primes ie primes upto 50k in a 30KB file. Actually I need primes till $2^{30}$ but obviously its not possible to store such a huge list in a file of size of the order of some KBs. So my goal is the…
user1080747
4
votes
3 answers

How to maximize the expected number of corrected guesses?

A, B are to play heads or tails for $N$ rounds. They win a round if both guess correctly. A and B are allowed to communicate their strategy before the game starts. A knows the full sequence of $N$ results right after the game starts, before making…
arax
  • 2,759
  • 1
  • 18
  • 24
4
votes
2 answers

squashed sine wave

Sinewave I'm slightly out of my comfort zone with this one. I need to produce a function for use in an animation, but a sine wave isn't quite right. I tried adding a square wave, but that didn't work either. What think I need is a "squashed" sine…
Grill
  • 43
  • 4
3
votes
1 answer

PCA for data compression

I would like to use PCA (Principal Component Analysis) to compress a sequence of vectors, $v_0 \ldots v_n$. My plan is to concatenate these vectors into a matrix: $M = [ v_0 \ldots v_n ]$ I will then use PCA to create a smaller representative set of…
3
votes
1 answer

Is compressibility a good test for randomness of a pseudorandom sequence?

I am interested in tests and definitions of randomness of a sequence generated by a pseudo-random number generator. A similar question was asked a few years ago, and the response was to use a Kolmogorov-Smirnov test for membership in the…
Lars Ericson
  • 112
  • 2
  • 13
3
votes
1 answer

Does Ramsey theory prove that all sufficiently long random sequences can be slightly compressed?

First, my apologies if this has already been asked and answered. I did search this community for five to ten minutes looking for similar questions and found none. My lay understanding of Ramsey theory is that “in any large enough piece of disorder…
Nick Gall
  • 139
  • 3
3
votes
1 answer

How to find Turing Machine for given arbitrary output

Are there general methods / algorithms for finding a Turing Machine that will output a given binary number? For example, I want the machine to write 0111001101111001110110001110110011000010110100101101110 on a blank tape and then halt. Is there a…
SCH
  • 145
  • 7
3
votes
3 answers

How is this possible to convert a long string to a number with less characters?

I'm going to write a program (function) that can convert a long string to a number. For this, first I convert each character (letter) to a number; like a=0.01, b=0.02, c=0.03 ... . then for example I have: abc // I don't want to return…
Mohammad Kermani
  • 141
  • 1
  • 2
  • 12
2
votes
1 answer

Complete Codes and Kraft Inequality

Li and Vitanyi define a complete code as a uniquely decodable code to which no codeword can be added while keeping it uniquely decodable. They claim that this is easily seen to be equivalent to equality holding in the Kraft inequality. I can see…
2
votes
1 answer

Kolmogorov Complexity and Compression Schemes

My question concerns strings with low Kolmogorov Complexities and if there is a single compression scheme that can be used to compress them I have been introduced to Kolmogorov Complexity through Introduction to Theory of Computation, According to…
2
votes
0 answers

Entropy of "finite length" Bernoulli process

I need to compress the outputs of a Bernoulli process and already decided to use Golomb coding. However, there is something that still feels confusing to me and that I hope to understand better. Maybe I'm confused about the notion of an "arrival…
2
votes
3 answers

Is the Kolmogorov complexity of any string equally low?

I'm learning just now about this topic so this might be the most naive of the questions. So, if I understand it correctly, the string: ababababababababababababababababababababababababab has a very low Kolmogorov complexity because you can make a…
Swike
  • 261
  • 1
  • 7
1
2 3 4 5 6 7