Ask Your Question
1

Prevod do Chomskeho tvaru

asked 2015-02-02 18:27:30 +0100

anonymous user

Anonymous

Ahojte, chcem sa spytat na jednu vec, ktorej neviem ako sa zbavit. Ak prevadzam gramatiku do chomskeho tvaru, musi byt vlastna, cize potrebujem sa zbavit jednoduchych pravidiel. Problem mam napr s tymto

A -> aaAbbBccC | B
B -> A | c  | d | dd

Ako sa zbavit toho B na pravej strane v Acku, a zas A v Becku, to ked dosadim tak mi to tam stale zostane, a neviem, co s tym. Dakujem za odpovede.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
2

answered 2015-02-02 18:49:32 +0100

MiB gravatar image

Pokud jsou v definici pravidla A → B a B → A, dají se oba neterminály libovolně zaměňovat, takže je můžeš sloučit do jednoho, např. X:

X → aaXbbXccC | X | c | d | dd
edit flag offensive delete publish link more

Comments

super diky, teraz by som sa vsak este porteboval nejak zbavit toho samotneho X na pravej strane.

gandalf ( 2015-02-02 19:30:35 +0100 )edit

Pravidlo X -> X vůbec nic nedělá, takže se dá škrtnout.

Viktor Chlumský ( 2015-02-02 20:13:36 +0100 )edit

je to len v tomto pripade, ci plati to vseobecne? Ked sa nad tym zamyslim, tak to zrejme mozem vyhodit vzdy. Dakujem velmi pekne :)

gandalf ( 2015-02-02 20:14:30 +0100 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Question tools

Follow
1 follower

Stats

Asked: 2015-02-02 18:27:30 +0100

Seen: 106 times

Last updated: Feb 02 '15