summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/ab_2/en.py
blob: 4dd81a599ab29b99a244a64aee45ad6a1989cc24 (plain)
1
2
3
4
5
6
7
8
9
10
11
# coding=utf-8

name = 'ab/2'
slug = 'a*b*'

description = '''\
<p>Write a DCG with the starting symbol <code>ab</code> for the language <code>a<sup>m</sup>b<sup>n</sup></code>, where m, n ≥ 0.</p>
<p>Example words: <code>[]</code>, <code>a</code>, <code>aab</code>, <code>abbb</code>, <code>bbb</code>.</p>
<p>Hint: to generate words of increasing length, use the query <code>conc(Word,_,_), ab(Word,[])</code>.</p>'''

hint = {}