Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lecture "Computability", exercise 1 #7

Open
essepuntato opened this issue Oct 18, 2023 · 20 comments
Open

Lecture "Computability", exercise 1 #7

essepuntato opened this issue Oct 18, 2023 · 20 comments
Labels

Comments

@essepuntato
Copy link
Contributor

Write the table of instructions of a Turing machine with four states – A (initial state), B, C, and D (final state) – such that, once reached the final state, only the cells immediately on the left and on the right of the initial position of the head of the machine will have the value 1 specified. The final state must not have any instruction set in the table.

@CarlaMenegat
Copy link

CarlaMenegat commented Oct 18, 2023

Captura de Tela 2023-10-20 às 12 36 26

Captura de Tela 2023-10-18 às 14 18 24

@vattelalberto
Copy link

vattelalberto commented Oct 18, 2023

image
I managed to design a turing machine that works if the input is fixed (0) but could not design one working for any input number with only 4 nodes.
This is my turingmachine.io code:

blank: '0'
start state: A
end state: D
table:
  A:
    '0' : {write: 1, R: B}
    '1'  : {write: 0, L: C}
  B:
    [0, 1] : {write: 1, L: A}
  C:
    [0, 1] : {write: 1, R: D}
  D:

@Liber-R
Copy link

Liber-R commented Oct 18, 2023

Screenshot 2023-10-19 180741
Screenshot 2023-10-19 180733

@Asemica-me
Copy link

image

blank: '0' 
start state: A 
table: 
  A:
    0: { write: 1, L: B } 
    1: { write: 0, R: C }
  B:
    0: { write: 1, R: A }
  C:
    0: { write: 1, R: D }
  D:

image

@rufferbaraldi
Copy link

Turingtable
Turing

input: '000'
blank: '0'
start state: A
end state: D
table:

A:
[0, 1] : {write: 1, R: B}
B:
[0, 1] : {write: 0, R: C}
C:
[0, 1] : {write: 1, L: D}
D:

@qwindici
Copy link

qwindici commented Oct 19, 2023

telegram-cloud-photo-size-4-5875183131563245999-y

blank: '0'
start state: A
table:

  A:
    0: {write: 1, L: B}
  B: 
    1: {write: 0, R: C}
    0: {write: 1, R}
  C:
    0: {write: 1, L: D}
  D:

Screenshot 2023-10-19 at 13 37 47

@rufferbaraldi
Copy link

Correcting...

Turingtable
Turing

@parkful
Copy link

parkful commented Oct 19, 2023

Screenshot 2023-10-19 at 17 08 45 Screenshot 2023-10-19 at 17 04 41 Screenshot 2023-10-19 at 17 06 02 98bbc8">

@valetedd
Copy link

turingex_1

table:
  A:
    [0, 1, ' ']: {write: '0', L: B}
  B:
    " ": {write: 1, R: B}
    0: {R: C}
    1: {write: 0, R: C}
  C:
    " ": {write: 1, L: D}
  D: ```

@valentinabertelli
Copy link

ca3_es1
blank: " "
start state: A
table:
A:
0: {L: C}
1: {L: C}
" ": {write: 0, R: B}
B:
0: {write: 1, L: A}
1: {write: 1, L: A}
" ": {write: 1, L: A}
C:
0: {write: 1, L: D}
1: {write: 1, L: D}
" ": {write: 1, L: D}
D:

@VirginiaDa00
Copy link

Lez 3  Esercizio 1

@essepuntato
Copy link
Contributor Author

Hi all, thanks for your takes. Just a note for all: remember that you are entitled to use only two symbols in the Turing Machines, i.e. 0 and 1, so the blank symbol should be 0. Using, as a blank symbol, the space character means to use three symbols in the Turing Machine...

@frammenti
Copy link

frammenti commented Oct 20, 2023

Start state: A
End state: D

Current state Tape symbol Write symbol Move head Next state
A 0 1 L B
B 0 1 R C
C 1 0 R B
C 0 R D
D
# 1 is printed only left and right the starting position.
blank: '0'
start state: A
table:
  # print 1, move left
  A:
    [0]: {write: 1, L: B}
  # print 1, move back right
  B:
    [0]: {write: 1, R: C}
  # check if 1, turn it to 0 and back to B, otherwise stop
  C:
    [1]: {write: 0, R: B}
    [0]: {R: D}
  D:

image

@saramadonia
Copy link

b3dbff25-0e86-4136-99f7-c9bb30a5caf0
957e68b0-618f-47a6-a4bf-33fac453b8a0

@annapasetto0
Copy link

annapasetto0 commented Oct 20, 2023

input: '00000'
blank: '0'
start state: A
table:
A:
0: {write: 1, L: B}
1: {write: 0, R: C}
B:
0: {write: 1, R: A}
C:
0: {write: 1, R: D}
D:

tab

tmv

@simocasaz
Copy link

IMG_20231022_183655.jpg

@MariaFrancesca6
Copy link

Table of instructions:

blank: '0'
 start state: A
 table:
   A:
     0: {write: 1, L: B}  
     1: {write: 0, R: C}
   B:
     0: {write: 1, R: A}
   C:
     0: {write: 1, R: D}
   D:

Starting state:

image

Final state:

image

@Sergpoipoip
Copy link


turing_machine_1

@Alice-Ant
Copy link

IMG_2450
The machine starts in state A. If it reads a 0 or 1 in state A, it writes 1, moves right, and transitions to state B. In state B, if it reads a 0, it writes 0, moves left, and transitions to state C. If it reads a 1, it writes 1, moves right, and stays in state B. In state C, regardless of the input symbol, it writes 0, moves right, and transitions to the final state D. Once in state D, the machine halts and does not have any instructions specified for this state.

@enricabruno
Copy link

Initial state:
computability-ex1-a

Final state:
computability-ex1-b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests