Bringing Together Paradox, Counting, and Computation To Make Randomness! CS 15-251 Lecture 21 

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Lecture 6. Prefix Complexity K The plain Kolmogorov complexity C(x) has a lot of “minor” but bothersome problems Not subadditive: C(x,y)≤C(x)+C(y) only.
Lecture 9. Resource bounded KC K-, and C- complexities depend on unlimited computational resources. Kolmogorov himself first observed that we can put resource.
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
MATH 224 – Discrete Mathematics
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
QuickSort Average Case Analysis An Incompressibility Approach Brendan Lucier August 2, 2005.
Greedy Algorithms Amihood Amir Bar-Ilan University.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Ancient Paradoxes With An Impossible Resolution. Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2005 Lecture 29Apr 28, 2005Carnegie.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
CS420 lecture one Problems, algorithms, decidability, tractability.
CSE115/ENGR160 Discrete Mathematics 02/28/12
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Sorting Algorithms. Motivation Example: Phone Book Searching Example: Phone Book Searching If the phone book was in random order, we would probably never.
Discrete Structures & Algorithms More about sets EECE 320 — UBC.
CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis Tyler Robison Summer
CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis Dan Grossman Spring 2010.
CSC1016 Coursework Clarification Derek Mortimer March 2010.
Chapter 3 Growth of Functions
Big-O and Friends. Formal definition of Big-O A function f(n) is O(g(n)) if there exist positive numbers c and N such that: f(n) = N Example: Let f(n)
Great Theoretical Ideas in Computer Science.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 10Feb 12, 2004Carnegie.
Randomized Computation Roni Parshani Orly Margalit Eran Mantzur Avi Mintz
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
This material in not in your text (except as exercises) Sequence Comparisons –Problems in molecular biology involve finding the minimum number of edit.
Data Structures – LECTURE 10 Huffman coding
Data Structures Review Session 1
Algorithm Efficiency and Sorting
Chapter 11: Limitations of Algorithmic Power
Information Theory and Security
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
While Loops and Do Loops. Suppose you wanted to repeat the same code over and over again? System.out.println(“text”); System.out.println(“text”); System.out.println(“text”);
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Introduction to AEP In information theory, the asymptotic equipartition property (AEP) is the analog of the law of large numbers. This law states that.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Computability Kolmogorov-Chaitin-Solomonoff. Other topics. Homework: Prepare presentations.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Introduction to Algorithms Chapter 16: Greedy Algorithms.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 8. Greedy Algorithms.
COMPSCI 102 Discrete Mathematics for Computer Science.
Discrete Mathematics for Computer Science. + + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences Chapter 9 slides 1-54.
Great Theoretical Ideas in Computer Science.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Coding Theory Efficient and Reliable Transfer of Information
Building Java Programs Chapter 12 Recursion Copyright (c) Pearson All rights reserved.
COMPSCI 102 Introduction to Discrete Mathematics.
Huffman Codes Juan A. Rodriguez CS 326 5/13/2003.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Great Theoretical Ideas in Computer Science.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 7Sept 20, 2005Carnegie.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science V. AdamchikCS Spring 2006 Lecture 6Feb 2, 2005Carnegie.
What is Binary Code? Computers use a special code of their own to express the digital information they process. It's called the binary code because it.
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Winter 2015.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Payam Seraji IPM-Isfahan branch, Ordibehesht 1396
Probabilistic Algorithms
Recursion notes Chapter 8.
CSE 311 Foundations of Computing I
Data Compression If you’ve ever sent a large file to a friend, you may have compressed it into a zip archive like the one on this slide before doing so.
Digital Encodings.
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
The Limitations of Proofs: An Incompressible Resolution
Formal Languages, Automata and Models of Computation
Counting II: Recurring Problems And Correspondences
Counting II: Recurring Problems And Correspondences
Presentation transcript:

Bringing Together Paradox, Counting, and Computation To Make Randomness! CS Lecture 21 

Gottfried Wilhelm von Leibniz There is almost no paradox without utility

BERRY PARADOX: “The smallest natural number that can’t be named in less than fourteen words.”

Java is an unambiguous language where each program denoted exactly one output. What happens when we express the Berry paradox in Java?

Counting A set of binary stings is “prefix-free” if no string in the set is a prefix of another string in the set

Theorem: If S is prefix-free and contains no strings longer than n, then S contains at most 2 n strings. For each string x in S, let S x be the set of all length n strings with x as a prefix. The S x are mutually disjoints sets, so the number of elements in S is bounded by the number of length n stings.

Binary Java is Prefix-Free We will represent Java in binary (using ASCII codes for each character). We will allow only java programs where all the classes are put in one big class delimited by { }.

Storing Poker Hands I want to store a 5 card poker hand using the smallest number of bits (space efficient). The naïve scheme would use 2 bits for a suit, 4 bits for a rank, and hence 6 bits per card and 30 bits per hand. How can I do better?

Order the Poker hands lexicographically To store a hand all I need is to store its index of size  log(2,598,560)  =22 bits. Notice that in your programming assignment you made a fast way to go back and forth between this compressed representation and a poker hand.

22 Bits Is OPTIMAL 2 21 < 2,598,560 There are more poker hands than there are 21 bit strings. Hence, you can’t have a string for each hand.

Incompressibility We call a binary string x incompressible if the shortest Binary Java program to output x is at least as long as x.

Th: Half the strings of any given length are incompressible Java is prefix-free so there are at most 2 n-1 programs of length n-1 or shorter. There are 2 n strings of length n, and hence at least half of them have no smaller length program that outputs them.

A compressible string … a million times..01 public class Counter { public static void main(String argv[]) public static void main(String argv[]) { for (int i=0; i< ; i++) for (int i=0; i< ; i++)System.out.print("01"); } }

It is possible to define randomness in terms of incompressibility Kolmogorov Chaitin

If a string x is incompressible, then there is nothing atypical that you can say about it. Suppose D is some atypical, computable predicate that is true of x. Since D is atypical, it is not true of many n bit strings. So compress x by referring to x by its index i in the enumeration of strings of length n that have property D.

When we notice a “pattern”, we always mean something atypical

So when you see a “pattern” in a sufficiently long string it allows you to compress it. Hence, incompressible strings have no pattern.

BERRY PARADOX: “The smallest natural number that can’t be named in less than fourteen words.”

Java Berry The shortest incompressible string that is longer than this Java program

Java Berry The shortest incompressible string that this program can certify is longer than this program

Let INCOMPRESSIBLE be a JAVA routine whose program length is n. INCOMPRESSIBLE(x) = “yes” means x is definitely incompressible INCOMPRESSIBLE(x) = “not sure”, otherwise

BERRY BERRY will contain INCOMPRESSIBLE as a sub-routine. BERRY will do the following: use the self-printing trick to measure its own length k. Then it will loop through strings of length k+1 to infinity and output the first one for which INCOMPRESSIBLE answers “yes”. Notice: There is a constant c such that the length of BERRY is n+c.

BERRY can’t output anything, or else there would be a real paradox Theorem: There exists a c, such that no program INCOMPRESSIBLE of length n outputs “yes” on any string of length n+c or greater.

Let  be a formal system with n bits of axioms There exists a constant (independent of the formal system) such that all true sentences of the form “x is incompressible” (where x has length n+c) are NOT PROVABLE in the system.

Chaitin’s 

 is the “halting probability”. Flip a fair coin until you get a sequence that represents a program. Run the program. Omega is the probability that this process halts.

 is a maximally unknowable number

 is the optimally compressed form of the halting oracle.

The first n bits of give enough information to solve the halting problem for any program with length bounded by n. The first n bits of  give enough information to solve the halting problem for any program with length bounded by n. L:=0 Timeshare each program When a program of length a halts, add 2 -a to L. When the first n bits of L equals the first n- bits of, any length <= n program that is going to halt will have halted. When the first n bits of L equals the first n- bits of , any length <= n program that is going to halt will have halted.

From n-bits of  we can find all incompressible strings of length n+1 Determine all the programs of length n that halt. Run them and cross off any (n+1)-bit strings they output. The strings that are left are incompressible.

n bits of axioms can only help you know n + c bits of n bits of axioms can only help you know n + c bits of  Or else you could prove that strings longer than your axiom system were incompressible

 Is not compressible by more than a constant. Suppose you could compress n bits of by more than a constant to get a string X. Decompress X and use it to find an incompressible strings of length n+1 and output it. This method has the length of X plus a constant which is still less than n+1. Contradiction. Suppose you could compress n bits of  by more than a constant to get a string X. Decompress X and use it to find an incompressible strings of length n+1 and output it. This method has the length of X plus a constant which is still less than n+1. Contradiction.