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

Typo in example of README #107

Open
marcofavorito opened this issue Feb 11, 2021 · 0 comments
Open

Typo in example of README #107

marcofavorito opened this issue Feb 11, 2021 · 0 comments

Comments

@marcofavorito
Copy link
Member

Describe the bug
In the "How to use" section of the README, the example is not correct (README at the commit: https://github.com/whitemech/pythomata/blob/cb521b8c98a63069ebc7a36e3ac43d47ab2941e6/README.md).

By replacing the transition:

(s2, a, s3)

With the transition:

(s2, c, s3)

It works again.

The code snippet becomes:

from pythomata import SimpleDFA
alphabet = {"a", "b", "c"}
states = {"s1", "s2", "s3"}
initial_state = "s1"
accepting_states = {"s3"}
transition_function = {
    "s1": {
        "b" : "s1",
        "a" : "s2"
    },
    "s2": {
        "c" : "s3",
        "b" : "s1"
    },
    "s3":{
        "c" : "s3"
    }
}
dfa = SimpleDFA(states, alphabet, initial_state, accepting_states, transition_function)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant