# Generate Aheui Number

## Wolfram Language (Mathematica), score 849/101 = 8.406

[email protected]_:[email protected]<>"망히"
[email protected]_:[email protected]=Switch[n,-1,"밯",1,"반반나",9,"밞",8,"밣",7,"밝",6,"밦",5,"발",4,"밗",3,"받",2,"박",
_,[email protected]{[email protected],[email protected],[email protected]}]
[email protected]_:[email protected][email protected]#<>If[# #==n,"빠",f[n/#]]<>"따"&/@Select[[email protected],1<# #<=n&]//mn
[email protected]_:[email protected][email protected]#<>f[n-#]<>"다"&/@Range[⌈n/2⌉-1]//mn
[email protected]_:[email protected]=m[n+#]<>[email protected]#<>"타"&/@Range[n-1]//mn
[email protected]*MinimalBy[StringLength[""<>#]&]


Try it online!

Builds numbers with 다 (+) 따 (*) 타 (-), and 빠 (duplicate), in addition to literals for 2..9. Doesn't actually make use of 밯=-1.

Paste the tio output (Unicode character codes) into Mathematica to see the result:

100 -> 밗발빠따따망히
101 -> 박밞박밞다따다망히
102 -> 밦밣밞다따망히
103 -> 받밗발빠따따다망히
104 -> 밣밗밞다따망히
105 -> 받발밝따따망히
106 -> 박밗밝빠따다따망히
107 -> 박받발밝따따다망히
108 -> 박밦밞따따망히
109 -> 밗받발밝따따다망히
110 -> 박발박밞다따따망히
111 -> 받박발밝따다따망히
112 -> 박밝밣따따망히
113 -> 발박밦밞따따다망히
114 -> 박받밦밞따다따망히
115 -> 발박받밝따다따망히
116 -> 박박밝밣따다따망히
117 -> 밞밗밞다따망히
118 -> 박받밝밣따다따망히
119 -> 밝밣밞다따망히
120 -> 받발밣따따망히
121 -> 박밞다빠따망히
122 -> 박발밝밣따다따망히
123 -> 받발밗밞따다따망히
124 -> 박밦밝밣따다따망히
125 -> 발발빠따따망히
126 -> 박밝밞따따망히
127 -> 박발발빠따따다망히
128 -> 박밣빠따따망히
129 -> 받받발밣따다따망히
130 -> 박발밗밞다따따망히
131 -> 받박밣빠따따다망히
132 -> 박밦박밞다따따망히
133 -> 밝박밣밞다다따망히
134 -> 박받밣빠따다따망히
135 -> 받발밞따따망히
136 -> 밣밣밞다따망히
137 -> 박받발밞따따다망히
138 -> 박발밣빠따다따망히
139 -> 받밣밣밞다따다망히
140 -> 밗발밝따따망히
141 -> 받박발밞따다따망히
142 -> 박밝밣빠따다따망히
143 -> 박밞다밗밞다따망히
144 -> 박밣밞따따망히
145 -> 발박받밞따다따망히
146 -> 박밞밣빠따다따망히
147 -> 받밝빠따따망히
148 -> 박박밣밞따다따망히
149 -> 박받밝빠따따다망히
150 -> 발발밦따따망히
151 -> 밗받밝빠따따다망히
152 -> 박밗밣밞따다따망히
153 -> 밞밣밞다따망히
154 -> 박밝박밞다따따망히
155 -> 발받밗밝따다따망히
156 -> 박밦밗밞다따따망히
157 -> 밗밞밣밞다따다망히
158 -> 박밝밣밞따다따망히
159 -> 받밗밝빠따다따망히
160 -> 밗발밣따따망히
161 -> 밝박받밝따다따망히
162 -> 박밞빠따따망히
163 -> 받밗발밣따따다망히
164 -> 밗발밗밞따다따망히
165 -> 받발박밞다따따망히
166 -> 박박밞빠따다따망히
167 -> 발박밞빠따따다망히
168 -> 받밝밣따따망히
169 -> 밗밞다빠따망히
170 -> 박발밣밞다따따망히
171 -> 받받밦밞따다따망히
172 -> 박발밞빠따다따망히
173 -> 밗밗밞다빠따다망히
174 -> 박밦밞빠따다따망히
175 -> 발발밝따따망히
176 -> 박밣박밞다따따망히
177 -> 받받밝밣따다따망히
178 -> 박밣밞빠따다따망히
179 -> 밗발발밝따따다망히
180 -> 밗발밞따따망히
181 -> 밦발발밝따따다망히
182 -> 박밝밗밞다따따망히
183 -> 받발밝밣따다따망히
184 -> 밗밗밦밝따다따망히
185 -> 발박발밝따다따망히
186 -> 받밦밝밣따다따망히
187 -> 박밞다밣밞다따망히
188 -> 밗박발밞따다따망히
189 -> 받밝밞따따망히
190 -> 발박밗밞따다따망히
191 -> 박받밝밞따따다망히
192 -> 받밣빠따따망히
193 -> 밗받밝밞따따다망히
194 -> 박받밣빠따따다망히
195 -> 받발밗밞다따따망히
196 -> 밗밝빠따따망히
197 -> 발받밣빠따따다망히
198 -> 박밞박밞다따따망히
199 -> 받밗밝빠따따다망히
200 -> 발발밣따따망히


The lowest number that improves with 타 is 211, with 받밣밞따따발타 (3*8*9-5) beating out 발밠밝따따반반나다 (5*6*7+2/2).

The next lowest, 239 (받밞빠따따밗타=3*9*9-4), didn't require 반반나 in its 다/따-only construction (받밣밞따밝다따박다=3*(8*9+7)+2).

An earlier version of this program generated 다/따-only constructions.

### With 밯=-1 (score unchanged)

[email protected]_:[email protected]<>"망히"
[email protected]_:[email protected]=Switch[n,1,"밯",9,"밞",8,"밣",7,"밝",6,"밦",5,"발",4,"밗",3,"받",2,"박",
_,[email protected]{[email protected],[email protected],[email protected]}]
[email protected]_:[email protected][email protected]#<>If[# #==n,"빠",f[n/#]]<>"따"&/@Select[[email protected],1<# #<=n&]//mn
[email protected]_:[email protected][email protected]#<>f[n-#]<>If[#==1,"타","다"]&/@Range[⌈n/2⌉-1]//mn
[email protected]_:[email protected]=m[n+#]<>[email protected]#<>If[#==1,"다","타"]&/@Range[n-1]//mn
[email protected]*MinimalBy[StringLength[""<>#]&]


Try it online!

If the program is given no input, 밯 (read a character from input) returns -1, which allows for a one-character 1 literal.

The lowest number that benefits from this is 269, which improves to 발밦밞따따밯다 (5*6*9+(-1)) from 박받밣밞빠따다따다 (2+3*(8+9*9)).

## Jelly, Score 849/101 = 8.406; 126 bytes of Jelly code

9,€µŒċZ€ṪḢ,0Ɗ¹E?ṭƊ€ż,ƭ€Ɱ€⁾+×ẎF€€ḢV;Ɗ€;@1ị<ɗƇ201FL$Þµ1ịⱮŒQTịµ$3¡Ṣṫ100Ṫ€F€⁵;‘,@⁾+×¤yⱮị⁽ıaD×588+“Ḥþ’Ḣ;+¥“ƲG~ọ’b21¤;ƲƲ¤;€“ẒP“ṃƓ’Ọ


Try it online!

A niladic link that returns a list of Jelly strings, one for each Aheui number from 100 to 200. The footer on TIO prepends the total length and the mean length.

Note this is equal in score to attinat’s Mathematica answer, but shorter in code length to generate the Aheui numbers. Full explanation to follow. Uses ㅂ (push), ㄷ (add), ㄸ (multiply) and ㅃ (duplicate) for initial consonants.

Output:

8.405940594059405
849
100 - 밖밙빠따따망희
101 - 밖밙따밟빠따다망희
102 - 밨밤밟다따망희
103 - 밙밤따밞밟따다망희
104 - 밤밖밟다따망희
105 - 받밙밞따따망희
106 - 밙빠따밟빠따다망희
107 - 밙밞따밤밟따다망희
108 - 박밨밟따따망희
109 - 밖밞따밟빠따다망희
110 - 바밟다박밟다따망희
111 - 밙밨따밟빠따다망희
112 - 박밞밤따따망희
113 - 밖밤따밟빠따다망희
114 - 밨밞따밤밟따다망희
115 - 받박밞밤따따다망희
116 - 밙밞따밟빠따다망희
117 - 밟밖밟다따망희
118 - 밨밟따밤빠따다망희
119 - 밞밤밟다따망희
120 - 받밙밤따따망희
121 - 박밟다빠따망희
122 - 바박밟다빠따다망희
123 - 밨밞따밟빠따다망희
124 - 박밨밞밤따다따망희
125 - 밙밙빠따따망희
126 - 박밞밟따따망희
127 - 밞밟따밤빠따다망희
128 - 박밤빠따따망희
129 - 밨밤따밟빠따다망희
130 - 바밟다밖밟다따망희
131 - 받박밤빠따따다망희
132 - 박밨따박밟다따망희
133 - 밙박밤빠따따다망희
134 - 박받밤빠따다따망희
135 - 받밙밟따따망희
136 - 밤밤밟다따망희
137 - 밞밤따밟빠따다망희
138 - 박밙밤빠따다따망희
139 - 받밤밤밟다따다망희
140 - 밖밙밞따따망희
141 - 바밖밙밞따따다망희
142 - 박밖밙밞따따다망희
143 - 박밟다밖밟다따망희
144 - 박밤밟따따망희
145 - 밤빠따밟빠따다망희
146 - 박바밤밟따다따망희
147 - 받밞빠따따망희
148 - 바받밞빠따따다망희
149 - 박받밞빠따따다망희
150 - 밙밙밨따따망희
151 - 바밙밙밨따따다망희
152 - 박밖밤밟따다따망희
153 - 밟밤밟다따망희
154 - 박밞따박밟다따망희
155 - 박밟밤밟다따다망희
156 - 박밨따밖밟다따망희
157 - 밖밟밤밟다따다망희
158 - 박밞밤밟따다따망희
159 - 받밖밞빠따다따망희
160 - 밖밙밤따따망희
161 - 바밖밙밤따따다망희
162 - 박밟빠따따망희
163 - 바박밟빠따따다망희
164 - 박바밟빠따다따망희
165 - 박밟다받밙따따망희
166 - 박박밟빠따다따망희
167 - 밙박밟빠따따다망희
168 - 받밞밤따따망희
169 - 밖밟다빠따망희
170 - 바밟다밤밟다따망희
171 - 박밖밟다빠따다망희
172 - 박밙밟빠따다따망희
173 - 밖밖밟다빠따다망희
174 - 박밨밟빠따다따망희
175 - 밙밙밞따따망희
176 - 박밤따박밟다따망희
177 - 박밙밙밞따따다망희
178 - 박밤밟빠따다따망희
179 - 밖밙밙밞따따다망희
180 - 밖밙밟따따망희
181 - 바밖밙밟따따다망희
182 - 박밞따밖밟다따망희
183 - 받밖밙밟따따다망희
184 - 밖바밙밟따다따망희
185 - 밙바밖밟따다따망희
186 - 받밨밞밤따다따망희
187 - 박밟다밤밟다따망희
188 - 밖박밙밟따다따망희
189 - 받밞밟따따망희
190 - 바받밞밟따따다망희
191 - 박받밞밟따따다망희
192 - 받밤빠따따망희
193 - 바받밤빠따따다망희
194 - 박받밤빠따따다망희
195 - 받밙따밖밟다따망희
196 - 밖밞빠따따망희
197 - 바밖밞빠따따다망희
198 - 박밟다박밟따따망희
199 - 받밖밞빠따따다망희
200 - 밙밙밤따따망희
`