Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3 5 Skyline language The pen of a plotter moves on a grid. If it currently is at a point p = ( x

Exercise 35 Skyline language
The pen of a plotter moves on a grid. If it currently is at a point p=(x,y)inZZ, then it accepts
three different commands: u(upwards),d(downwards) and r(right). The pen will move to the point
p'=(x,y+1),(x,y-1) or (x+1,y) respectively and draws a line from p to p'. Initially, the pen is
at the origin (0,0).
A word over the alphabet {u,d,r} represents a sequence of commands and therefore a line. For
example, the word ururdddru represents the line
(a) A line is a Skyline, if it
does not visit any point twice,
only visits points (x,y) with y0 and
ends at a points (x,0) with x>0.
In particular, the empty word and the example given above are not Skylines.
Examples for Skylines:
Give a context free grammar which generates all sequences of commands that represent Skylines.
Briefly explain why all words that are generated by your grammar satisfy the three conditions.
(b) Show that the set of Skyline words is not regular.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions