I have a question from a test in a Programming Languages class that is confusing me.
Give a context-fre开发者_开发技巧e grammar to generate the following language
L = { aibjck | 0 <= i <= j <= i + k }
I am completely unfamiliar with this notation. I cant seem to find anything in the book or my notes about it, and I have no idea how to query google for the answer.
If you recognize it, what is it called and what does it mean?
a^i just means a repeated i times. So a^2 = aa, b^10 = bbbbbbbbbb, etc.
Often,
{}means "the set of"|means "such that"
I have no idea what a, b, c are. i and j are non-negative numbers, being greater than or equal to zero. Conventionally, those letters are reserved for integers. The fact that
i <= i + k
means that k is also non-negative.
If a, b, and c are reals, then it seems to me that L is just the set of real numbers. However, it seems like a very contrived and elaborate way of specifying it. That would be something like Dr. Evil's plot to kill Austin Powers.
So you have "the set of a to the power i times b to the power j time c to the power j such that i, j and k are positive, and j is greater than or equal to i ..." and so on.
加载中,请稍侯......
精彩评论