An open API service indexing awesome lists of open source software.

https://github.com/cr2007/f29fb-assignment

Turing Machine Code for Foundations 2 Course (F29FB)
https://github.com/cr2007/f29fb-assignment

foundations-2 turing-machine unary-multiplication

Last synced: 9 months ago
JSON representation

Turing Machine Code for Foundations 2 Course (F29FB)

Awesome Lists containing this project

README

          

# F29FB Assignment





Python






Open in GitHub Codespaces


## Course: [Foundations 2](https://curriculum.hw.ac.uk/coursedetails/F29FB?termcode=202223) (F29FB)

Unary Multiplication Turing Machine Code

## Index
- [Steps:](#steps)
- [Accepted inputs (Example):](#accepted-inputs-example)
- [Unaccepted inputs (Example):](#unaccepted-inputs-example)

## Steps:
(Make sure you have [Python](https://www.python.org/downloads/) installed on your machine before running the code)

1. Go to the [Python file](F29FB.py)
2. Open your terminal
3. Type `python3 F29FB.py`
4. Enter your input value and see the result in a TM tape

Make sure that your input in a **unary value**.

## Accepted inputs (Example):
- `1*1` ($1 \times 1$)
- `1111*11` ($4 \times 2$)
- `b*11` ($0 \times 2$)
- `0*111` ($0 \times 3$)
- `11*0` ($2 \times 0$)
- `11*111` ($2 \times 3$)
- `111*B` ($3 \times 0$)

## Unaccepted inputs (Example):
- `1*2` (not unary)
- `3*2` (not unary)
- `1*0` (not unary)