0% found this document useful (0 votes)
42 views

Name of Student: Sap Id

The document provides instructions for submitting an assignment. It includes the student's name and ID, assignment details like ID, title, submission mode and deadline. It provides guidelines for submitting the assignment on time in PDF format with a specific naming convention. The assignment includes 3 problems to solve - generating strings from a context free grammar using left and right derivations, checking if another grammar is ambiguous, and counting tokens in a C statement.

Uploaded by

Kunal Ranjan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Name of Student: Sap Id

The document provides instructions for submitting an assignment. It includes the student's name and ID, assignment details like ID, title, submission mode and deadline. It provides guidelines for submitting the assignment on time in PDF format with a specific naming convention. The assignment includes 3 problems to solve - generating strings from a context free grammar using left and right derivations, checking if another grammar is ambiguous, and counting tokens in a C statement.

Uploaded by

Kunal Ranjan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment

Name of Student: SAP ID:

Submission
Submission Assessment Group/ Deadline
Assignment ID Assignment Mode- Method- Individual- Weightage- Date of (Date and
-01 Title-Unit-1 Offline Offline Individual 02 Release time)

Instructions (Sample provided below, please change as necessary):

 Assignment must be submitted by the Due Date and Time as mentioned above.
 Assignment submitted after Due Date and Time and before the next 48 hours
will be marked late and will attract a penalty of X marks (out of the overall Y
marks, and it will be evaluated out of Y-X marks only). Assignment will not be
considered for evaluation subsequently (after 48 hours past due date and time),
and a score of zero will be awarded.
 Submitted assignment must have your Full Name and SAP ID in the space
provided above this page in the Header.

Submitting this Assignment

 You will submit (upload) this assignment in Moodle.


 Email/paper submissions will not be accepted (except for UG students who are
not yet registered in Moodle).
 Questions must be answered in the given order.
 Submit a pdf version of this document.
 Name this document as A1_CSD207_Even2020_John_Doe.pdf in case your name
is John Doe, and you are submitting Assignment 1 of the course whose code is
CSD207, and it is offered in the Even Semester of the Year 2020.
Assignment

Name of Student: SAP ID:

Problems:

1. Let G be a Context Free Grammar for which the production Rules are given
below: S -> aB|bA
A -> a|aS|bAA
B -> b|bS|aBB
Drive the string aaabbabbba using the above grammar (using Left Most
Derivation and Right most Derivation).
2. Check whether the given grammar G is ambiguous or not.
A → AA
A → (A)
A→a
3. Find the number of tokens in the following C statement:
printf("i = %d, &i = %x", i, &i);

You might also like