Grammar and its application to FractalsLet G=(N,T,P,∑) where ∑ is the start symbol, N = {D}, T = {d, r, l}, andP = {∑→D, D→DrDllDrD, D → d}
1. Give the most specific type of grammar G.2. Show the leftmost derivation sequence of the string drdlldrd, (i.e. When deriving a new sentential form, always replace one Nonterminal at a time and always replace the leftmost Nonterminal)3. Suppose d is an abstraction of a command to draw a straight line of fixed length in the current direction, r is an abstraction of a command to turn right by 60 degrees, and l is an abstraction of a command to turn left by 60 degrees. Assuming that you are to start from a point and that the starting direction is to proceed horizontally to the right, show the figure represented by the generated string drdlldrd.4. The string drdlldrdrdrdlldrdlldrdlldrdrdrdlldrd can also be generated. Assuming that you are to start from a point and that the starting direction is to proceed horizontally to the right, show the figure represented by the string drdlldrdrdrdlldrdlldrdlldrdrdrdlldrd.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here