# Question: 4 a expression trees are used to represent calculations when...

###### Question details

4. (a) Expression trees are used to represent calculations when
many modern programming languages are compiled. Show the trees for
the expressions:

i. (x + y)*z /( y + z)

ii. z + (z * y) – (x + z)

and evaluate the trees when x=14, y=10 and z=2.

[8 Marks]

(b) Let G= be a graph with vertices V={v1, v2, v3,…..,vn} and E
the set of edges. i. Define and show on a graph what is
meant by a circuit on G

ii. Define and show on a graph what is meant by a Eulerian circuit
on G

[6 Marks]

iii. Suppose there are a number of meeting to schedule for
various employee groups using as few time slots as possible. If two
meetings need the same employee groups present, then they cannot be
scheduled in the same time slot.

Solve this problem by colouring a graph (using as few colours as
possible). The following table shows the set of meetings needing to
be attended by employee groups groups Planning (P), Manufacturing
(M), Quality (Q) and Personnel (HR).