Question: Suppose that a CS student wants to encode events taking place in an ice - hockey game to a string using alphabet Gamma =

Suppose that a CS student wants to encode events taking place in an ice-hockey game to a string
using alphabet \Gamma ={a, b, c,1,2,3, x, y,|}, where
a, b, c 1st,2nd and 3rd wing of the home team enters the ice
1,2,31st,2nd and 3rd wing of the visiting team enters the ice
x home team scores
y visitor scores
| end of period
For simplicity, we assume that only full wings can be changed, which takes place when the game
is paused (i.e., individual players cannot change at anytime). Valid strings include exactly two |
delimiters to indicate the end of the 1st and 2nd period. The game ends when the string ends, i.e.,
there is no final | symbol. Moreover, at the start of each period both teams must put some wing
on ice, i.e., each period starts with two symbols of which one is from {a, b, c} and the other from
{1,2,3}(in either order). After that wings can change and both teams can score. Hence, e.g.,
a2b1|a1x|3c is a valid (yet short) string corresponding to a game that home team won 10.
a) Let A denote the language corresponding to all valid strings, i.e. entries that are correctly
recorded. Show that A is a regular language. Hint: give first a RE for one period.
b) Let B denote those interesting games where at no point in time either team leads by more than
1 goal. Is B regular or non-regular? (Argue why!)
c) Plus-minus statistic is an often used performance metric: a goal means +1 for the wing, and
when opponent scores the wing on ice receives -1. Let C denote the games where home teams
1st wing has a positive plus-minus statistic. Show that C is context-free.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!