 Hello, welcome to the session on Contacts-Free Grammar and Derivation Treats. At the end of this session, student will be able to explain the Contacts-Free Grammar and derive parse tree for given grammar. Languages are generated by Contacts-Free Grammars or Contacts-Free Languages. Contacts-Free Grammar are more expressive than finite automata. If a language L is accepted by a finite automata, then language L can be generated by Contacts-Free Grammar. But the converse is not true. A Contacts-Free Grammar is of four tuple, sigma, nt, r and s, where sigma is an alphabet set. Each character in sigma is called terminal, nt is also set. Each element in nt is called non-terminal, r is the set of rule. It is a subset of non-terminal and terminals. The production is written in the form of alpha producing beta. Beta is called a sentinental form. In some books, CFG can also be defined as G is equal to VTPS, where same V is variables a finite set, T is alphabets or terminals, it is also finite set, P is the set of productions where S is start symbol. And the production form includes terminal, non-terminals and non-terminal producing terminals that is A produces small a. Here we will see the method of deriving a CFG. V is a one-step variable from U, written U derives V. If U is equal to x alpha z and V is equal to x beta z, then we can write alpha determines beta or alpha produces beta in r as x z are common in both. V is variable from U written as U derives V and it can be used recursively. There is a chain of one derivation from the U derives U1, U1 derives U2 and such up to V that is the terminal grammar CFG. In derivation the context free grammar in the format of G is equal to sigma Nt r and S or it is format VTPS. The language is generated or derived from G. Now here language is produced by starting with S and it is recursively expressing and producing word. Now here one example is shown A raise to N, B raise to N where N is greater than or equal to 0. This is a canonical non-regular language and the production will be S producing null or S producing A, S, B. This can be produced using this S non-terminal in recursive time. So here tree which is derived it is called as a parse tree. A parse tree of a derivation is a tree in which each internal node is labelled with non-terminal. If a rule A determines A1, A2 up to AN occurs in the derivation then A is a parent node and labelled as A1, A2 like this. Next parse tree can see with leaves that are the terminals and they cannot be further derived. Here A and B are in blue colour are terminals and S is non-terminal which can be further derived. Now we will see derivation and the parse tree with example. Here in this example S, A and B are non-terminals at the left hand side and any combination of terminals and non-terminals at the right hand side. So it is a grammar of type 2 that is CFG. Here we will derive a word using above production that is the rules A, A, B, B. Here we have two derivations for a single word for using different order. What are these? S is equal to A, B, A, A, B, small A, A, B and that will be A, A, B, A, A, B, B and finally we are having small A, small A, small B and small B. So we can have these derivations. Now this derivation tree is having root label S, then we are having interior nodes, all these interior nodes. Then each parental is having children node that is having the derivation steps. Then finally we are having leaf nodes and all leaf nodes when we are making together it will be a word. So this is the final derived word. So this is the derivation tree which is starting from a start symbol, then non-terminal symbol and then finally the word will be there. So the same example is there. Then we will see how the derivations are there and pass trees are there. So this is the first pass tree which is deriving S, S is equal to A, B that A is again derived with A, A and B is derived with small B, capital B and finally we are having A, A, B, A. The pass tree we are having S, then it is deriving for A, B, then capital A small B, capital B, then A, A, B, B and thus we are again deriving whatever our word is A, A, B, B. We will see one more tree is there that is the one more possibility it is deriving the word S to A, A to A, A and then again A to A, A, A to A, B and finally that is also deriving the same word with the same grammar. Here totally we can see three pass trees or three different derivations. So when we are having same grammar, single grammar, one word and many derivations then that is called as an ambiguity. What is an ambiguous grammar? A grammar G is ambiguous if there is a word belongs to this grammar having at least two different pass tree that has at least two left most derivations or two right most derivations. So draw a tree for above grammar, so for this grammar we have two pass trees, one is left most and one is right most, thank you.