Simulation circuit of Turing machine

By designing a Turing machine simulation circuit, using multiple simulation circuit units and clock modules, combined with a programmable gate array FPGA, the cost and volume problems of Turing machine simulation in the existing technology are solved, and a low-cost simulation device suitable for teaching is realized. Ensures the stability of data input and output.

CN118658360AActive Publication Date: 2024-09-17CEEC JIANGSU ELECTRIC POWER DESIGN INST CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410756780.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-17
Estimated Expiration
2044-06-13

AI Technical Summary

Technical Problem

It is difficult to effectively simulate a Turing machine in classroom teaching with existing technology, and the cost of manufacturing a complete Turing machine is high and the size is too large, making it difficult to realize a low-cost simulation device.

Method used

A Turing machine simulation circuit is designed, which includes multiple Turing machine simulation circuit units. Through the series connection structure of the input terminal, the first register, the state transfer circuit, the second register and the output terminal, the clock module and multiplexer are used to realize data processing. Stable input and output, and realize state transfer through programmable gate array FPGA, simplifying the structure and volume.

Benefits of technology

A low-cost, compact Turing machine simulation circuit is implemented, which is suitable for classroom teaching. It can simulate the read-write head operation and data modification of the Turing machine, avoiding the design of additional storage modules and ensuring the stability and continuity of data input and output. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658360A
    Figure CN118658360A
Patent Text Reader

Abstract

The invention discloses a simulation circuit of a Turing machine, and belongs to the field of computer science. The Turing machine simulation circuit comprises a plurality of Turing machine simulation circuit units; the Turing machine simulation circuit unit comprises an input end used for receiving input data; the first register is used for storing data from the input end or the second register; the state transition circuit is used for acquiring the state data of the Turing machine at the next moment according to the data from the first register of the Turing machine simulation circuit unit or the adjacent Turing machine simulation circuit unit; a second register for storing data from the state transition circuit; the output end is used for being connected with display equipment so as to display data from the second register; wherein the first register, the state transition circuit and the second register are sequentially connected in series between the input end and the output end; the output end of the second register is coupled with the input end of the first register. According to the invention, simulation of the Turing machine is realized with low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer science and relates to a simulation circuit of a Turing machine. Background Art

[0002] The Turing machine is the simplest type of computable model. Its concept was first seen in a paper published by mathematician A. Turing between 1936 and 1937. It can implement any given algorithm by designing its state transition method. The Turing machine is the standard computational model for courses related to computable theory in colleges and universities, so it is often necessary to demonstrate the computational process of the Turing machine during teaching. If a complete Turing machine with all components is actually manufactured, not only will the manufacturing cost be high, but the volume will also be too large, which is not convenient for classroom teaching purposes. Therefore, a device that can simulate the Turing machine and is easy to demonstrate in the classroom is urgently needed. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a Turing machine simulation circuit to achieve Turing machine simulation at a low cost.

[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0005] The present invention provides a Turing machine simulation circuit, comprising: a plurality of Turing machine simulation circuit units; the Turing machine simulation circuit units include:

[0006] An input terminal, used for receiving input data;

[0007] A first register for storing data from an input terminal or a second register;

[0008] A state transfer circuit, used for obtaining state data of the Turing machine at the next moment according to data from the first register of the Turing machine simulation circuit unit where the circuit is located or adjacent to the circuit;

[0009] a second register for storing data from the state transfer circuit;

[0010] an output terminal, used for connecting to a display device to display data from the second register;

[0011] Among them, the first register, the state transfer circuit and the second register are connected in series between the input end and the output end in sequence; the output end of the second register is coupled to the input end of the first register; and the state transfer circuit is coupled to the output end of the first register of the adjacent Turing machine simulation circuit unit.

[0012] Furthermore, it also includes a clock module, which is used to provide a clock signal for the first register and the second register of the multiple Turing machine simulation circuit units.

[0013] Furthermore, a NOT gate is provided at the clock signal input terminal of the first register.

[0014] Furthermore, the number of the Turing machine simulation circuit units is greater than or equal to 3.

[0015] Furthermore, the first register and the second register are both composed of triggers.

[0016] Furthermore, the trigger includes a D trigger.

[0017] Furthermore, the Turing machine simulation circuit unit also includes a multiplexer, which is arranged between the input end and the first register; the output end of the second register is coupled to the input end of the first register through the multiplexer.

[0018] Furthermore, it also includes a selection circuit, which is sequentially coupled to the multiplexer input terminals of the plurality of Turing machine simulation circuit units to transmit a selection signal to the multiplexer;

[0019] When the selection signal is 1, the multiplexer transfers input data of the input end to the first register; when the selection signal is 0, the multiplexer transfers output data of the second register to the first register.

[0020] Furthermore, the state transfer circuit includes a field-programmable gate array (FPGA).

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] The Turing machine simulation circuit provided by the present invention simulates the Turing machine read / write head to write, erase or modify the data on the read / write tape through a plurality of Turing machine simulation circuit units arranged in parallel, and provides a synchronous clock signal to the first register and the second register through a clock module to ensure the stability and continuity of data input and output. The read / write head position and the Turing machine state are encoded into the first register and the second register, so that there is no need to design an additional storage module to store the read / write head position and the Turing machine state. The Turing machine simulation circuit of the present invention has a simple structure, a compact size, and a low cost, and is suitable for use in scenarios such as classroom teaching. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a schematic diagram of the Turing machine model;

[0024] Figure 2 A schematic diagram of the structure of a simulation circuit of a Turing machine provided by an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of the area affected by the Turing machine read / write head;

[0026] Figure 4 Coding diagram for Turing machine;

[0027] Figure 5 A schematic diagram of the operation flow of the simulation circuit of the Turing machine provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. The embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0029] The term "and / or" herein is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein generally indicates that the front and back associated objects are in an "or" relationship. The orientation or position relationship indicated by the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "inside", "outside", etc. is based on the orientation or position relationship shown in the accompanying drawings, and is only used to explain the relative position relationship, movement, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure / application.

[0030] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0031] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood by specific circumstances.

[0032] The device structure of a Turing machine is as follows Figure 1 As shown, it includes a read-write tape, a read-write head, a read-write head moving device, a controller and a bracket. The read-write tape is used to display written data and is composed of linear cells, and its length must be able to meet the needs of program operation; the read-write head is used to write, erase or modify data on the read-write tape; the read-write head control device is used to move the read-write head left or right; the controller is used to control the read-write operation of the read-write head, move the read-write head, and convert and record the current state of the Turing machine.

[0033] The operation process of the Turing machine is as follows: the Turing machine starts running from a certain position (initial position) on the paper tape, reads the symbol on the current cell, and uses the state transfer function to calculate according to the current state and the read symbol; according to the state transfer function, the Turing machine may change the current state, write a new symbol, and move the head one cell to the left or right; repeat the above steps.

[0034] like Figure 2 As shown, an embodiment of the present invention provides a Turing machine simulation circuit, including multiple Turing machine simulation circuit units.

[0035] The Turing machine simulation circuit unit includes an input terminal, a first register, a state transfer circuit, a second register and an output terminal coupled in series in sequence, and the state transfer circuit is coupled to the output terminal of the first register of the adjacent Turing machine simulation circuit unit, and the output terminal of the second register is coupled to the input terminal of the first register.

[0036] Among them, the input end is used to connect the data input device to receive input data, the input end is used to simulate the cells of the Turing machine read-write tape, and the input data received by the input end is equivalent to the initial data on the cells of the Turing machine read-write tape.

[0037] The output terminal is used to connect a display device to display the calculation status of the Turing machine, including displaying the data on the cells of the read-write tape.

[0038] The first register is used to store data from the input terminal or data from the second register.

[0039] The Turing machine simulation circuit unit of the present invention further comprises a multiplexer arranged between the input end and the first register, and the output end of the second register is coupled to the input end of the first register through the multiplexer.

[0040] The Turing machine simulation circuit of the present invention further includes a selection circuit, which is sequentially coupled to the input terminals of the multiplexers of all the Turing machine simulation circuit units of the present invention to transmit a selection signal to the multiplexer. The selection signal output is 0 or 1. When the selection signal is 1, the multiplexer transmits the input data of the input terminal to the first register coupled thereto; when the selection signal is 0, the multiplexer ignores the input terminal signal and transmits the output data of the second register to the first register coupled thereto.

[0041] The state transfer circuit is used to obtain the state data of the Turing machine at the next moment according to the data from the first register of the Turing machine simulation circuit unit where it is located or adjacent to it.

[0042] In the embodiment of the present invention, the state transfer circuit element is composed of a field programmable gate array FPGA (Field Programmable Gate Array) with erasable function, which is convenient for modifying the Turing machine algorithm it simulates. The function of the state transfer circuit is to obtain the data on the Turing machine read-write tape at the current moment from the first register, convert it into the data on the Turing machine read-write tape at the next moment, and store it in the second register.

[0043] The data at the input and output ends can be encoded according to specific needs. Whenever an encoding method is determined, the state transfer circuit needs to be updated to adapt to this encoding method.

[0044] The calculation process of the Turing machine is local. In each step of the calculation, the Turing machine can only change the data in the cell where its read / write head is located and move to the adjacent cell. For example, Figure 3 This shows the layout of a Turing machine in a certain calculation. The black cells are where the read / write heads are located. After the Turing machine completes this calculation, the cells it can affect are limited to Figure 3 The data of the rest of the cells will not change, and will not become the position of the read / write head. Therefore, the state transfer circuit of the present invention only needs to couple with itself and the first register of the Turing machine simulation circuit unit on both sides to complete the calculation of the corresponding cell data.

[0045] In other embodiments of the invention, if it is necessary to manufacture a simulation circuit with a Turing machine read / write tape length greater than 3 cells, it is only necessary to repeat Figure 2 The component arrangement pattern in sets up more Turing machine simulation circuit units.

[0046] The second register is used to store data from the state transfer circuit.

[0047] The position of the Turing machine read / write head and the state of the Turing machine can be encoded into the cell where the read / write head is located. For example, Figure 4The figure shows the pattern of a Turing machine in a certain calculation. The black cell is the position of the read / write head. At this time, the Turing machine is in state A. Then the position of the read / write head and the Turing machine state can be encoded into the black cell, becoming "#A,1". The present invention encodes the position of the read / write head and the Turing machine state into the first register and the second register, thereby eliminating the need to design an additional storage module to store the position of the read / write head and the Turing machine state.

[0048] The Turing machine simulation circuit unit of the present invention also includes a clock module, which is used to provide a synchronous clock signal for the first register and the second register of all Turing machine simulation circuit units in the present invention to control the data output of the first register and the second register to ensure the accuracy, stability and continuity of data transmission.

[0049] In the embodiment of the present invention, the first register and the second register are both composed of a D flip-flop (data flip-flop), which is triggered on the rising edge of the clock. A NOT gate is provided at the clock signal input end of the first register, the second register receives the CLK signal, and the first register receives the inverted ^CLK signal, and the first register and the second register update data at different times.

[0050] Figure 5 The schematic diagram of the operation flow of the simulation circuit of the Turing machine in the embodiment of the present invention is as follows. After the data is input through the input end, the cyclic calculation process of "first register-state transfer circuit-second register" begins. Since the second register is connected to the clock signal CLK, and the first register is connected to the clock signal ^CLK, this cycle can be completed within one clock cycle. The output end continuously outputs the data in the second register, and the external device connected thereto can monitor and display the calculation process accordingly.

[0051] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of this disclosure / application.

Claims

1. A Turing machine simulation circuit, characterized in that: include: A plurality of Turing machine simulation circuit units; the Turing machine simulation circuit units include: An input terminal, used for receiving input data; A first register for storing data from an input terminal or a second register; A state transfer circuit, used for obtaining state data of the Turing machine at the next moment according to data from the first register of the Turing machine simulation circuit unit where the circuit is located or adjacent to the circuit; a second register for storing data from the state transfer circuit; an output terminal, used for connecting to a display device to display data from the second register; Among them, the first register, the state transfer circuit and the second register are connected in series between the input end and the output end in sequence; the output end of the second register is coupled to the input end of the first register; and the state transfer circuit is coupled to the output end of the first register of the adjacent Turing machine simulation circuit unit.

2. The Turing machine simulation circuit according to claim 1, characterized in that: It also includes a clock module, which is used to provide a clock signal for the first register and the second register of the multiple Turing machine simulation circuit units.

3. The simulation circuit of the Turing machine according to claim 2, characterized in that: A NOT gate is provided at the clock signal input terminal of the first register.

4. The simulation circuit of the Turing machine according to claim 1, characterized in that: The number of the Turing machine simulation circuit units is greater than or equal to 3.

5. The Turing machine simulation circuit according to claim 1, characterized in that: The first register and the second register are both formed by flip-flops.

6. The Turing machine simulation circuit according to claim 5, characterized in that: The trigger comprises a D flip-flop.

7. The Turing machine simulation circuit according to claim 1, characterized in that: The Turing machine simulation circuit unit also includes a multiplexer, which is arranged between the input end and the first register; the output end of the second register is coupled to the input end of the first register through the multiplexer.

8. The Turing machine simulation circuit according to claim 7, characterized in that: Also included is a selection circuit, the selection circuit being sequentially coupled to the multiplexer input terminals of the plurality of Turing machine simulation circuit units to transmit a selection signal to the multiplexer; When the selection signal is 1, the multiplexer transfers the input data of the input end to the first register; When the selection signal is 0, the multiplexer passes the output data of the second register to the first register.

9. The Turing machine simulation circuit according to claim 1, characterized in that: The state transfer circuit includes a field programmable gate array (FPGA).

Citation Information

Patent Citations

  • General-purpose parallel computing architecture

    CN107636638A

  • FPGA implementation method of multi-clock single-state organized P system

    CN110321318A

  • Turing machine architecture based on reservoir calculation

    CN117933326A

  • Calculation simulation device of 8-bit binary addition and subtraction Turing machine

    CN219574972U

  • Device for teaching programming

    SU781878A1