Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!helios!archone!byron From: byron@archone.tamu.edu (Byron Rakitzis) Newsgroups: comp.compression Subject: Another naive question Message-ID: <14292@helios.TAMU.EDU> Date: 8 Apr 91 03:06:08 GMT Sender: usenet@helios.TAMU.EDU Organization: College of Architecture, Texas A&M University. Lines: 23 I was wondering if anyone could point me in the right direction so I can find out more about the so-called "entropy" of data. Just thinking about it in the shower, it occurs to me that one might be able to take any given binary string, and say, "this turing machine foo can print this string bar". If foo's number (you can enumerate all turing machines) has a smaller number of digits than the original string bar, then you've just shown something interesting about bar, namely that it has a more compact representation in the form of a turing machine foo. Now, I'm probably barking up the wrong tree when I speak of turing machines, but I'm hoping someone will point me at the right references. Byron. --- char*c,q[512],m[256],*v[99],**u,*i[3];f[2],p;main(){for(m[m[60]=m[62]=32]=m[*m=m [124]=9]=6;e(-8),gets(1+(c=q))||exit(0);r(0,0))for(;*++c;);}r(t,o){for(*i=i[2]=0 ,u=v+98;m[*--c]^9;m[*c]&32?i[*c&2]=u[0],u-v^98&&++u:3)if(!m[*c]){for(*++c=0;!m[* --c];);*--u=c+++1;}u-v^98?strcmp(*u,"cd")?*c?pipe(f),o=f[1]:1,(p=fork())?e(p),o? r(o,0),z(o),z(*f):4,wait(0):(o?dup2(*f,0),z(*f),z(o):*i?1,z(0),e(open(*i,0)):5,t ?dup2(t,1),z(t):i[2]?9,z(1),e(creat(i[2],438)):2,e(execvp(*u,u))):e(chdir(u[1])* 2):6;}e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):5;}z(i){close(i);} (by Byron Rakitzis and Sean Dorward)