Consider the grammar:
S → aSbS | bSaS | 𝜖
Right most derivations for abab:
Case 1:
S → aSbS
→ aSb (applying S → 𝜖)
→ abSaSb (applying S → bSaS)
→ abSab (applying S → 𝜖)
→ abab (applying S → 𝜖)
Case 2:
S → aSbS
→ aSbaSbS (applying S → aSbS)
→ aSbaSb (applying S → 𝜖)
→ aSbab (applying S → 𝜖)
→ abab (applying S → 𝜖)
Write short notes on:
Draw the syntax tree and DAG from the following expression.
if x>0 then x=3*(y+1) else y=y+1
What is Weak entity set? Explain with suitable example.
Write short notes on:
What is tree traversal?
Define packet switching and circuit switching. What is MANET?