0% found this document useful (0 votes)
85 views5 pages

CS606 Assignment 2 Solution Spring 2024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views5 pages

CS606 Assignment 2 Solution Spring 2024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

CS606 ASSIGNMENT 2 SOLUTION SPRING 2024

Due Date: 24-June-2024


Total Marks: 20

DO NOT COPY PASTE THE SAME

FOR MORE CORRECT SOLUTIONS CONTACT


WHATSAPP +923162965677

Questions:
Consider the following state "I0" of LR(1) items for a hypothetical grammar;
I0 = {
[S' → .S, #],
[S → .A B C D E, #],
[A → .B C D E, a/b],
[B → .C D E, a/b],
[C → .D E, a/b],
[D → .E, a/b],
[E → .a, a/b],
[E → .b, a/b]
}

You are required to compute Goto procedures as shown below.

JOIN WHATSAPP GROUP


https://chat.whatsapp.com/IF8sHHq2GYz8BJwG9XEJB1
Goto (I0, S) = {
1 [S' → S., #]
}

Goto (I0, A) = {
2 [S → A. B C D E, #]
3 [A → B. C D E, a/b]
4 [B → C. D E, a/b]
5 [C → D. E, a/b]
6 [D → E., a/b]
7 [E → a., a/b]
}

Goto (I0, B) = {
8 [A → B. C D E, a/b]
9 [B → C. D E, a/b]
10 [C → D. E, a/b]
11 [D → E., a/b]
12 [E → a., a/b]
}

Goto (I0, C) = {
13 [B → C. D E, a/b]
14 [C → D. E, a/b]

JOIN WHATSAPP GROUP


https://chat.whatsapp.com/IF8sHHq2GYz8BJwG9XEJB1
15 [D → E., a/b]
16 [E → a., a/b]
}

Goto (I0, D) = {
17 [C → D. E, a/b]
18 [D → E., a/b]
19 [E → a., a/b]
}

Goto (I0, E) = {
20 [D → E., a/b]
}
Goto (I0, a) = {
21 [E → a., a/b]
}

Goto (I0, b) = {
22 [E → b., a/b]
}

Note: There is no need to write complete Goto procedures again. Rather, just write the required
statements concerning the numbers given below.
1. [S' → S., #]
2. [S → A. B C D E, #]

JOIN WHATSAPP GROUP


https://chat.whatsapp.com/IF8sHHq2GYz8BJwG9XEJB1
3. [A → B. C D E, a/b]
4. [B → C. D E, a/b]
5. [C → D. E, a/b]
6. [D → E., a/b]
7. [E → a., a/b]
8. [A → B. C D E, a/b]
9. [B → C. D E, a/b]
10. [C → D. E, a/b]
11. [D → E., a/b]
12. [E → a., a/b]
13. [B → C. D E, a/b]
14. [C → D. E, a/b]
15. [D → E., a/b]
16. [E → a., a/b]
17. [C → D. E, a/b]
18. [D → E., a/b]
19. [E → a., a/b]
20. [D → E., a/b]
21. [E → a., a/b]
22. [E → b., a/b]

JOIN WHATSAPP GROUP


https://chat.whatsapp.com/IF8sHHq2GYz8BJwG9XEJB1
REGARD - SARIM
WHATSAPP +923162965677

PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file before submitting
copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment must check your assignment requirement file.
If you need some help or question about file and solutions feel free to ask.

FOR FREE ASSIGNMENTS SOLUTIONS VISIT

VUStudentspk.com

JOIN WHATSAPP GROUP

https://chat.whatsapp.com/IF8sHHq2GYz8BJwG9XEJB1

You might also like