@@ -34,7 +34,7 @@ This conversion uses the same set of generators as the original, but smaller siz
34
34
### Second modified conversion (in ` second_b ` approach)
35
35
This conversion uses different set of generators as opposed to the first conversion
36
36
37
- <img src="https://latex.codecogs.com/png.latex?\\&space;G(T)&space;=&space;\{&space;q,&space;h,&space;s_0,&space;\ldots,&space;s_M,&space;q_0,&space;\ldots,&space;q_N,&space;q^R_0,&space;\ldots,&space;q^R_N&space;\}&space;\\&space;R(T)&space;=&space;\forall&space;\alpha&space;\in&space;0..N,&space;\beta&space;\in&space;0..M&space;:&space;\\&space;\begin{array}{r@{~=~}lc@{~if~}c@{~\in&space;T}}&space;q_i&space;s_j&space;&&space;q_l&space;s_k&space;&&space;&&space;q_i&space;s_j&space;s_k&space;q_l&space;\\&space;q_i&space;s_j&space;&&space;s_j&space;q_l&space;&&space;&&space;q_i&space;s_i&space;R&space;q_l&space;\\&space;s_j&space;q^R_i&space;&&space;q^R_l&space;s_j&space;&&space;&&space;q_i&space;s_i&space;L&space;q_l&space;\\&space;q_\alpha&space;s_\beta&space;&&space;s_\beta&space;q^R_\alpha&space;\\&space;q_\alpha&space;h&space;&&space;s_0&space;q^R_\alpha&space;h&space;\\&space;h&space;q^R_\alpha&space;&&space;h&space;q_\alpha&space;s_0&space;\\&space;q_0&space;s_\beta&space;&&space;q_0&space;\\&space;s_\beta&space;q_0&space;h&space;&&space;q_0&space;h&space;\\&space;h&space;q_0&space;h&space;&&space;q&space;\end{array}" />
37
+ <img src="https://latex.codecogs.com/png.latex?\\&space;G(T)&space;=&space;\{&space;q,&space;h,&space;s_0,&space;\ldots,&space;s_M,&space;q_0,&space;\ldots,&space;q_N,&space;q^R_0,&space;\ldots,&space;q^R_N&space;\}&space;\\&space;R(T)&space;=&space;\forall&space;\alpha&space;\in&space;0..N,&space;\beta&space;\in&space;0..M&space;:&space;\\&space;\begin{array}{r@{~=~}lc@{~if~}c@{~\in&space;T}}&space;q_i&space;s_j&space;&&space;q_l&space;s_k&space;&&space;&&space;q_i&space;s_j&space;s_k&space;q_l&space;\\&space;q_i&space;h&space;&&space;q_l&space;s_k&space;h&space;&&space;&&space;q_i&space;s_0&space;s_k&space;q_l&space;\\&space;q_i&space;s_j&space;&&space;s_j&space;q_l&space;&&space;&&space;q_i&space;s_i&space;R&space;q_l&space;\\&space;q_i&space;h&space;&&space;s_0&space;q_l&space;h&space;&&space;&&space;q_i&space;s_0&space;R&space;q_l&space;\\&space;s_j&space;q^R_i&space;&&space;q^R_l&space;s_j&space;&&space;&&space;q_i&space;s_i&space;L&space;q_l&space;\\&space;h&space;q^R_i&space;&&space;h&space;q^R_l&space;s_0&space;&&space;&&space;q_i&space;s_0&space;L&space;q_l&space;\\&space;q_\alpha&space;s_\beta&space;&&space;s_\beta&space;q^R_\alpha&space;\\&space;q_\alpha&space;h&space;&&space;s_0&space;q^R_\alpha&space;h&space;\\&space;h&space;q^R_\alpha&space;&&space;h&space;q_\alpha&space;s_0&space;\\&space;q_0&space;s_\beta&space;&&space;q_0&space;\\&space;s_\beta&space;q_0&space;h&space;&&space;q_0&space;h&space;\\&space;h&space;q_0&space;h&space;&&space;q&space;\end{array}" />
38
38
39
39
## Build status
40
40
[ ![ Build Status] ( https://travis-ci.org/YaccConstructor/LangToGroup.svg?branch=master )] ( https://travis-ci.org/YaccConstructor/LangToGroup )
@@ -62,12 +62,12 @@ Options:
62
62
-e file_path --error=file_path Full path to file, where errors should be recorded during parsing
63
63
-a approach --approach=approach Used approach, can be 'first', 'second', 'second_a' or 'second_b'
64
64
-L --LaTeX Print result in LaTeX format (while doesn't work)
65
- -I objects --info=objects Print useful information about objects. Objects must be separeted by comma. Every object must be 'grammar', 'turing_machine' or 'group_presentation' string.
65
+ -I objects --info=objects Print useful information about objects. Objects must be separeted by comma without spaces . Every object must be 'grammar', 'turing_machine' or 'group_presentation' string.
66
66
-h --help Print help and exit
67
67
```
68
68
69
69
For example, if you want build presentation of grammar via second modification of the second approach and get metrics of produced group presentation, you should type options:
70
- ` -i grammar.txt -a second_b -I group_presentation `
70
+ ` -i grammar.txt -a second_b -I grammar,turing_machine, group_presentation `
71
71
72
72
And if you want to build presentation of grammar via first approach and save produced group presentation to file, you should type options:
73
73
` -i grammar.txt -o group_presentation.txt -a first `
@@ -105,17 +105,18 @@ Here are the tables with some examples of building group presentations by differ
105
105
106
106
| Language | Grammar | N | States | Generators | Relations |
107
107
| -- | -- | -- | -- | -- | --|
108
- | 1 rule | CFG | 1 | 4 | 56187 | 89508 |
109
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{*} \} " > | CFG | 3 | 9 | 204903 | 347370 |
110
- | Dyck | CFG | 6 | 19 | 957619 | 1478859 |
108
+ | 1 rule | CFG | 1 | 6 | 89508 | 56187 |
109
+ | Dyck language without empty word| CFG | 10 | 77 | 2798322 | 1773449 |
110
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 10 | 228160 | 129611 |
111
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 63 | 2241518 | 1355357 |
111
112
112
113
113
114
### Running experiments for the second approach
114
115
115
116
| Language | Grammar | N | States | Generators | Relations |
116
117
| ----------| ---------| ---| ------------| -----------| --|
117
118
| 1 rule | CFG | 1 | 120 | 2300 | 28171 |
118
- | Dyck language without empty word | CFG | 10 | 1471 | 69755 | 1911168 |
119
+ | Dyck language without empty word | CFG | 10 | 943 | 40414 | 1025570 |
119
120
| <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 221 | 7384 | 149982 |
120
121
| <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 719 | 29510 | 719150 |
121
122
| <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} c^{n} \mid n \in N \} " > | Conjunctive | 14 | 3459 | 179112 | 5619872 |
@@ -125,24 +126,24 @@ Here are the tables with some examples of building group presentations by differ
125
126
### Running experiments for the second approach, modification ` a `
126
127
| Language | Grammar | N | States | Generators | Relations |
127
128
| ----------| ---------| ---| ------------| -----------| --|
128
- | 1 rule | CFG | 1 | 120 | 1562 | 18590 |
129
- | Dyck language without empty word| CFG | 10 | 1471 | 31934 | 852208 |
130
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 221 | 4191 | 82950 |
131
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 719 | 14348 | 340125 |
132
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} c^{n} \mid n \in N \} " > | Conjunctive | 14 | 3459 | 79021 | 2416992 |
133
- | <img src =" https://render.githubusercontent.com/render/math?math=\{ww \mid w \in \{a,b\}*\} " >| Boolean| 14 | 2498 | 58358 | 1674930 |
134
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{m} b^{n} c^{n} \mid (m != n), m, n \in N\} " > | Boolean | 14 | 3461 | 81374 | 2570073 |
129
+ | 1 rule | CFG | 1 | 120 | 1564 | 18603 |
130
+ | Dyck language without empty word| CFG | 10 | 943 | 19221 | 474552 |
131
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 221 | 4193 | 82971 |
132
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 719 | 14350 | 340150 |
133
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} c^{n} \mid n \in N \} " > | Conjunctive | 14 | 3459 | 79023 | 2417024 |
134
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{ww \mid w \in \{a,b\}*\} " >| Boolean| 14 | 2498 | 58360 | 1674960 |
135
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{m} b^{n} c^{n} \mid (m != n), m, n \in N\} " > | Boolean | 14 | 3461 | 81376 | 2570106 |
135
136
136
137
### Running experiments for the second approach, modification ` b `
137
138
| Language | Grammar | N | States | Generators | Relations |
138
139
| ----------| ---------| ---| ------------| -----------| --|
139
- | 1 rule | CFG | 1 | 120 | 926 | 8762 |
140
- | Dyck language without empty word | CFG | 10 | 1471 | 12683 | 271992 |
141
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 221 | 1780 | 27678 |
142
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 719 | 6080 | 115450 |
143
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} c^{n} \mid n \in N \} " > | Conjunctive | 14 | 3459 | 29695 | 727872 |
144
- | <img src =" https://render.githubusercontent.com/render/math?math=\{ww \mid w \in \{a,b\}*\} " >| Boolean| 14 | 2498 | 21649 | 498720 |
145
- | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{m} b^{n} c^{n} \mid (m != n), m, n \in N\} " > | Boolean | 14 | 3461 | 29727 | 751509 |
140
+ | 1 rule | CFG | 1 | 120 | 881 | 8164 |
141
+ | Dyck language without empty word | CFG | 10 | 943 | 7506 | 145444 |
142
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} \mid n \in N \} " > | CFG| 2 | 221 | 1683 | 25620 |
143
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} \mid n \in N \} " > | CFG| 5 | 719 | 5701 | 105950 |
144
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{n} b^{n} c^{n} \mid n \in N \} " > | Conjunctive | 14 | 3459 | 27624 | 661568 |
145
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{ww \mid w \in \{a,b\}*\} " >| Boolean| 14 | 2498 | 20200 | 455220 |
146
+ | <img src =" https://render.githubusercontent.com/render/math?math=\{a^{m} b^{n} c^{n} \mid (m != n), m, n \in N\} " > | Boolean | 14 | 3461 | 27655 | 683100 |
146
147
147
148
148
149
## Execution
0 commit comments