{"id":6544,"date":"2026-03-16T11:17:48","date_gmt":"2026-03-16T05:47:48","guid":{"rendered":"https:\/\/study.madeeasy.in\/?p=6544"},"modified":"2026-03-30T16:57:34","modified_gmt":"2026-03-30T11:27:34","slug":"leftmost-and-rightmost-derivations","status":"publish","type":"post","link":"https:\/\/www.madeeasy.in\/study\/cs-it\/leftmost-and-rightmost-derivations","title":{"rendered":"Left Most Derivation and Right Most Derivation"},"content":{"rendered":"<h2 style=\"text-align: center;\">Left Most Derivation and Right Most Derivation &#8211; Computer Science<\/h2>\n<p>In CFGs that are not linear, a derivation way involve sentential forms with more than one variable. In such cases, we have a choice in the order in which variables are replaced.<\/p>\n<p>Example: G = ({ABS}, {a, b}, S, P)<\/p>\n<p>1. S \u2192 AB<br \/>\n2. A \u2192 aaA<br \/>\n3. A \u2192 \u03bb<br \/>\n4. B \u2192 Bb<br \/>\n5. B \u2192 \u03bb<\/p>\n<p>Consider now two derivations:<\/p>\n<p><strong>1. Left Most Derivation (LMD)<\/strong>: A derivation is said to be left most in each step the left most variable<br \/>\nin the sentential form is replaced.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6546 size-full aligncenter\" src=\"https:\/\/study.madeeasy.in\/wp-content\/uploads\/2026\/01\/Left-Most-Derivation.jpg\" alt=\"Left Most Derivation \" width=\"597\" height=\"54\" srcset=\"https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2026\/01\/Left-Most-Derivation.jpg 597w, https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2026\/01\/Left-Most-Derivation-300x27.jpg 300w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/p>\n<p><strong>2. Right Most Derivation (RMD):<\/strong> A derivation is said to be right most if in each step the right most variable is replaced.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6545 size-full aligncenter\" src=\"https:\/\/study.madeeasy.in\/wp-content\/uploads\/2026\/01\/Right-Most-Derivation-.jpg\" alt=\"Right Most Derivation \" width=\"563\" height=\"48\" srcset=\"https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2026\/01\/Right-Most-Derivation-.jpg 563w, https:\/\/www.madeeasy.in\/study\/wp-content\/uploads\/2026\/01\/Right-Most-Derivation--300x26.jpg 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/p>\n<p style=\"text-align: center;\"><a class=\"btn btn-danger\" role=\"button\" href=\"https:\/\/study.madeeasy.in\/cs-it\/context-free-grammar\" target=\"_blank\" rel=\"noopener\">&lt;&lt; Previous<\/a> | <a class=\"btn btn-success\" role=\"button\" href=\"https:\/\/study.madeeasy.in\/cs-it\/chomsky-normal-form-cnf\" target=\"_blank\" rel=\"noopener\"> Next &gt;&gt;<\/a><br \/>\n<strong> Must Read: <\/strong> <a href=\"https:\/\/study.madeeasy.in\/cs-it\/what-is-theory-of-computation\" target=\"_blank\" rel=\"noopener\"><strong>What is Theory of Computation?<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Left Most Derivation and Right Most Derivation &#8211; Computer Science In CFGs that are not linear, a derivation way involve<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1930],"tags":[1943,1942],"class_list":["post-6544","post","type-post","status-publish","format-standard","hentry","category-cs-it","category-computation","tag-left-most-derivation","tag-right-most-derivation"],"_links":{"self":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/comments?post=6544"}],"version-history":[{"count":0,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6544\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/media?parent=6544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/categories?post=6544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/tags?post=6544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}