���ܤǤ�Wired�����夲���Τ���褦�ˤʤä�2,3 Turing Machine�Ǥ�����
- Wolfram Blog: The Prize Is Won; The Simplest Universal Turing Machine Is Proved
- WIRED VISION / �֥���ե���Υ��塼��󥰥ޥ���פ�20�Фγ���������
���ξ����ˡ�Perl���Ȥ��Ƥ��ޤ��Ȥ������á�
I have written several Perl programs, to demonstrate the constructions given in the proof and to interpret the systems given in various conjectures.
�㤨�Ф���ʴ�����
cytag.pl
#!/bin/perl -w
use strict;
my $working;
my @rules;
my $rulecount=0;
my $temp;
my $temp2;
my $doubling=0;
# If a Y is given as the first argument, double each element of the output to
# show the similarity to system 5
$ARGV[0]eq'Y' and do{$doubling=1; shift @ARGV;};
# Read from file
$ARGV[0]eq'F' and do{
shift @ARGV;
my $file = shift @ARGV;
local $/ = undef;
open INFILE, $file;
@ARGV = split(' ',<INFILE>);
close INFILE;
};
$|=1;
# Load the working string
$working=shift @ARGV;
chomp $working;
# Load the rules
for my $e (@ARGV)
{
chomp $e;
$e eq '""' and $e = '';
$rules[$rulecount++]=$e;
}
while($working ne '')
{
# Remove and print the first element of the working string
$temp=substr $working,0,1,'';
print $temp;
$doubling and print $temp;
push @rules, ($temp2 = shift @rules);
$temp eq '1' and $working .= $temp2;
}
print "\n";
���ƤΤȤ��ꡢ�٥��ȥץ饯�ƥ���Ū�ȤϤ����ʤ��ޤǤ�(�㤨�� whatever if whenever�Ǥʤ�whenever and whatever�Ȥ�������)���ʤ��ʤ����줤���ĸ���Ū��Perl��ץ�����ߥ󥰸���Ȥ��������饷�����Ȥ��ƻȤ��ͤ�¿���Ϥ�äȡ֤Ϥä��㤱���׽����򤹤�ΤǤ������ճ��ʤȤ����Ƕä����Ƥ�餤�ޤ�����
���������Ȥ����ϻ��褯���ޤ������μ������Ǥϡ���˿����񤯤��ڤǤ��͡�
����ò¤¤Ë¤ï¿½perl�Ȥ������äǤ�����
Dan the (Math|Perl) Monger
�ɵ�:Appendix������mathematica�Υ����ɤ�����ޤ���
���Υ֥����˥����Ȥ���ˤ�����������ɬ�פǤ���
��������������
���ε����ˤϵ��ĥ桼�����������Ȥ��Ǥ��ޤ���