[Cs4800] uniform input and output language

Karl Lieberherr lieber at ccs.neu.edu
Wed Nov 10 16:13:49 EST 2010


Let's use the following input language to the
closest pair algorithm:

Grammar:
ClosestPairInput = "(" <pairs> List(Pair) ")".
Pair = "(" <x> float <y> float ")".

Example:
( (1.3 1.7) (5.6 7.89) (6.0 8.889) (1.1 1.2))

We also need to agree on the output language:

Grammar:
ShortestPair = "shortest" "pair" Pair.

Example:
shortest pair (1.1 1.2)



More information about the Cs4800 mailing list