Docsity

Some Random Information, Lecture Notes - Computer Science, Study notes of Introduction to Computers

Partial preview of the text

Download Some Random Information, Lecture Notes - Computer Science and more Study notes Introduction to Computers in PDF only on Docsity!

Some Random Information

Bits^ 

How many bits do I need to store oneboolean value? ^

How many bits do I need to store theoutcome of one home pregnancy test? ^

A home pregnancy test reveals 1 bit ofinformation.

It may be the most important

life-changing bit of information, but it's stilljust 1 bit.

Information^ 

More Digits = More Information



Right?

Memorizing^ Volunteer to memorize 10 digits^ 

Volunteer to memorize 100 digits ^

Memorizing^ Another volunteer to memorize 100 digits^ 

4859937766824805299839179081504751450913524367800673622844553973169223820421306174607612086978543115 Is that harder to memorize than: ^

4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444 Why?Which contains more information?

Information:

a definition

The amount of informationin a sequence of digitsis equal tothe length of the shortest programthat prints those digits.

Write a program to print

print "

Memorizing Programs^ print "

is harder to memorize than

repeat 100:

print "4"

Information^ 

More Random = More Information

Pi and Information^ 3.14159265358979323846264338327...^ 

How much information is stored in thedigits of pi?

a program that prints pi^ sign

n

pi

repeat:

pi

pi

sign

×

n

print

pi

sign

sign

n

n

Information in Pi^ 

The digits of pi are output by a shortprogram. ^

So what? ^

So, pi must not contain very muchinformation. ^

Then what does???

An Exercise^ 

Start with a number from 1 to 10.



Multiply by 7, and find remainder whendivided by 11.

That's the next number.



Repeat.

An Exercise^ 

n

) mod 11

Let's start with 4.What sequence do we get? 

Does it look random?