Presentation is loading. Please wait.

Presentation is loading. Please wait.

オートマトンって? (Turing machine).

Similar presentations


Presentation on theme: "オートマトンって? (Turing machine)."— Presentation transcript:

1 オートマトンって? (Turing machine)

2 a2 an a1 q0 読み書きヘッド 空白記号♭は、 普通は書かない 入力文字列

3 a4 a a3 a2 a1 q 動作前

4 a4 a a3 a2 a1 q 動作前 δ(q, a) = (p, b, L)

5 a4 a a3 a2 a1 q 動作前 δ(q, a) = (p, b, L) a4 b a3 a2 a1  … p 動作後

6 つまり、 次のように動く

7 a1 a2 a a3 a4  … q

8 a1 a2 b a3 a4  … p

9 掛け算をやってみよう

10   2   3 1 1 1 1 1 q0 スタート

11   2   3 1 1 1 1 q♭ ♭が出現するまで右へ移動

12   2   3 1 1 1 1 q♭

13   2   3 1 1 1 1 q1 1を#に書き換える

14   2   3 1 # 1 1 q右 ♭が出現するまで右へ移動

15   2   3 1 # 1 1 q右 ♭が出現するまで右へ移動

16   2   3 1 # 1 1 q右 ♭を見つけたら@に書き換える

17   2   3 1 # 1 1 @ q左 #が出現するまで左に移動

18   2   3 1 # 1 1 @ q左 #が出現するまで左に移動

19   2   3 1 # 1 1 @ q左 #を見つけたら、その右の1を#に書き換える

20   2   3 1 # 1 1 @ q1 1を#に書き換える

21   2   3 1 # # 1 @ q右 ♭が出現するまで右に移動

22   2   3 1 # # 1 @ q右 ♭が出現するまで右に移動

23   2   3 1 # # 1 @ q右 ♭を見つけたら@に書き換える

24   2   3 1 # # 1 @ @ q左 #が出現するまで左に移動

25   2   3 1 # # 1 @ @ q左 #が出現するまで左に移動

26   2   3 1 # # 1 @ @ q左 #を見つけたら、その右の1を#に書き換える

27   2   3 1 # # 1 @ @ q1 #を見つけたら、その右の1を#に書き換える

28   2   3 1 # # # @ @ q右 ♭が出現するまで右に移動

29   2   3 1 # # # @ @ q右 ♭が出現するまで右に移動

30   2   3 1 # # # @ @ q右

31   2   3 1 # # # @ @ @ q左

32   2   3 1 # # # @ @ @ q左

33   2   3 1 # # # @ @ @ q左

34   2   3 1 # # # @ @ @ q左

35   2   3 1 # # # @ @ @ q1

36   2   3 1 # # # @ @ @ q終

37   2   3 1 # # 1 @ @ @ q終

38   2   3 1 # 1 1 @ @ @ q終

39   2   3 1 1 1 1 @ @ @ q終

40   2   3 1 1 1 1 @ @ @ q終

41   2   3 1 1 1 1 @ @ @ q終

42   2   3 1 1 1 1 @ @ @ q0

43   2   3 1 1 1 @ @ @ q♭

44   2   3 1 1 1 @ @ @ q1

45   2   3 # 1 1 @ @ @ q右

46   2   3 # 1 1 @ @ @ q右

47   2   3 # 1 1 @ @ @ q右

48   2   3 # 1 1 @ @ @ q右

49   2   3 # 1 1 @ @ @ q右

50   2   3 # 1 1 @ @ @ q右

51   2   3 # 1 1 @ @ @ @ q左

52   2   3 # 1 1 @ @ @ @ q左

53   2   3 # 1 1 @ @ @ @ q左

54   2   3 # 1 1 @ @ @ @ q左

55   2   3 # 1 1 @ @ @ @ q左

56   2   3 # 1 1 @ @ @ @ q1

57   2   3 # # 1 @ @ @ @ q右

58   2   3 # # 1 @ @ @ @ q右

59   2   3 # # 1 @ @ @ @ q右

60   2   3 # # 1 @ @ @ @ q右

61   2   3 # # 1 @ @ @ @ q右

62   2   3 # # 1 @ @ @ @ q右

63   2   3 # # 1 @ @ @ @ @ q左

64   2   3 # # 1 @ @ @ @ @ q左

65   2   3 # # 1 @ @ @ @ @ q左

66   2   3 # # 1 @ @ @ @ @ q左

67   2   3 # # 1 @ @ @ @ @ q左

68   2   3 # # 1 @ @ @ @ @ q左

69   2   3 # # 1 @ @ @ @ @ q1

70   2   3 # # # @ @ @ @ @ q右

71   2   3 # # # @ @ @ @ @ q右

72   2   3 # # # @ @ @ @ @ q右

73   2   3 # # # @ @ @ @ @ q右

74   2   3 # # # @ @ @ @ @ q右

75   2   3 # # # @ @ @ @ @ q右

76   2   3 # # # @ @ @ @ @ q左

77   2   3 # # # @ @ @ @ @ q左

78   2   3 # # # @ @ @ @ @ q左

79   2   3 # # # @ @ @ @ @ q左

80   2   3 # # # @ @ @ @ @ q左

81   2   3 @が6個 # # # @ @ @ q左

82   2   3 @が6個 # # # @ @ @ q左

83   2   3 @が6個 # # # @ @ @ q1

84   2   3 @が6個 # # # @ @ @ q終

85   2   3 @が6個 # # # @ @ @ q終

86   2   3 @が6個 # # # @ @ @ q終

87   2   3 @が6個 # # # @ @ @ q終

88   2   3 @が6個 # # # @ @ @ q終

89   2   3 @が6個 # # # @ @ @ q1

90   2   3  6 # # # @ @ @ q2

91   2   3 @が6個 # # # @ @ @ q0

92   2   3 @が6個 # # # @ @ @ q1

93   2   3 @が6個 # # # @ @ @ q1

94   2   3 @が6個 # # # @ @ @ q1

95   2   3 @が6個 # # # @ @ @ q2

96   2   3 @が6個 # # # @ @ @ q2

97   2   3 @が6個 # # # @ @ @ q2

98   2   3 @が6個 # # @ @ @ q3

99   2   3 @が6個 # @ @ @ q3

100   2   3 @が6個 @ @ @ q3

101   2   3 @が5個 1 @ @ @

102   2   3 @が4個 1 1 @ @

103   2   3 @が3個 1 1 1 @ @

104   2   3 @が2個 1 1 1 1 @

105   2   3 @1個 1 1 1 1 1 @

106 1が5個   2   3 1 1 1 1 1 @

107 1が6個   2   3 1 1 1 1 1 1

108 1が6個   2   3 1 1 1 1 1 1 受理

109 終わり                                    戻る   


Download ppt "オートマトンって? (Turing machine)."

Similar presentations


Ads by Google