{
  "translations": {
    "en": {
      "clean":{
        "type": "select",
        "description": "$\\textbf{Theorem}$ Let $L$ be a CFL that does not contain $\\lambda$. Then $\\exists$ a CFG for $L$ that does not have any useless productions, $\\lambda$-productions, or unit-productions.",
        "question": "How can we prove that?",
        "answer": ["Given any CFG, we can remove $\\lambda$ productions", "Given any $\\lambda$-free CFG, we can remove unit productions", "Given any CFG, we can remove useless productions"],
        "choices": ["Given any CFG, we can remove $\\lambda$ productions", "Given any $\\lambda$-free CFG, we can remove unit productions", "Given any CFG, we can remove useless productions"]
      },
      "order":{
        "type": "select",
        "description": "$\\textbf{Theorem}$ Let $L$ be a CFL that does not contain $\\lambda$. Then $\\exists$ a CFG for $L$ that does not have any useless productions, $\\lambda$-productions, or unit-productions.<br/>Proof<br/>1. Remove $\\lambda$-productions<br/>2. Remove unit productions<br/>3. Remove useless productions",
        "question": "Does the order matter?",
        "answer": "Yes. We must start by removing $\\lambda$ productions, a process that might give more unit and useless productions to remove.",
        "choices": ["Yes. We must start by removing $\\lambda$ productions, a process that might give more unit and useless productions to remove.", "No"]
      },
      "next":{
        "type": "select",
        "description": "$\\textbf{Theorem}$ Let $L$ be a CFL that does not contain $\\lambda$. Then $\\exists$ a CFG for $L$ that does not have any useless productions, $\\lambda$-productions, or unit-productions.<br/>Proof<br/>1. Remove $\\lambda$-productions<br/>2. Remove unit productions<br/>3. Remove useless productions",
        "question": "What comes after removing $\\lambda$-productions?",
        "answer": "We learned that to remove unit productions from a grammar, it must be $\\lambda$-free. Also, removing unit productions could produce useless productions. So do this first.",
        "choices": ["We learned that to remove unit productions from a grammar, it must be $\\lambda$-free. Also, removing unit productions could produce useless productions. So do this first.", "Remove useless productions"]
      },
      "ready":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.",
        "question": "Consider the grammar on the left, does the grammar contain any $\\lambda$-productions, unit productions, or useless productions?",
        "answer": "No",
        "choices": ["Yes", "No"]
      },
      "removeterms":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.",
        "question": "What should we do for the highlighted production?",
        "answer": ["Convert the terminal $c$ to $C_1$ and add a new production $C_1 \\rightarrow c$", "Convert the terminal $d$ to $C_2$ and add a new production $C_2 \\rightarrow d$"],
        "choices": ["Convert the terminal $c$ to $C_1$ and add a new production $C_1 \\rightarrow c$", "Convert the terminal $d$ to $C_2$ and add a new production $C_2 \\rightarrow d$"]
      },
      "Cc":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.",
        "question": "What should we do for the highlighted production?",
        "answer": "Convert the terminal $c$ to $C_3$ and add a new production $C_3 \\rightarrow c$",
        "choices": ["Convert the terminal $c$ to $C_3$ and add a new production $C_3 \\rightarrow c$", "Do something else."]
      },
      "shortenS":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.<br/>3. Replace every right-hand-side of length >2 by a series of productions, each with right-hand-side of length 2.",
        "question": "What should we do for the highlighted production?",
        "answer": "Reduce the right hand side to be $C\\ D_1$ by adding a new production $D_1 \\rightarrow B\\ C_1 \\ C_2$",
        "choices": ["Reduce the right hand side to be $C\\ D_1$ by adding a new production $D_1 \\rightarrow B\\ C_1 \\ C_2$", "Do something else."]
      },
      "cisdone":{
        "type": "true/false",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.<br/>3. Replace every right-hand-side of length >2 by a series of productions, each with right-hand-side of length 2.",
        "question": "For the highlighted production we do not need to change anything as the production is in CNF",
        "answer": "True",
        "choices": []
      },
      "D1":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.<br/>3. Replace every right-hand-side of length >2 by a series of productions, each with right-hand-side of length 2.",
        "question": "What should we do for the highlighted production?",
        "answer": "Reduce the right hand side to be $B\\ D_2$ by adding a new production $D_2 \\rightarrow C_1 \\ C_2$",
        "choices": ["Reduce the right hand side to be $B\\ D_2$ by adding a new production $D_2 \\rightarrow C_1 \\ C_2$", "Do something else."]
      },
      "arewedone":{
        "type": "select",
        "description": "$\\textbf{Theorem:}$ Any CFG $G$ with $\\lambda$ not in L(G) has an equivalent grammar in CNF.<br/>Proof<br/>1. Remove $\\lambda$-productions, unit productions, and useless productions.<br/>2. For every right-hand-side of length >1, replace each terminal $x_i$ by a new variable $C_j$ and add the production $C_j \\rightarrow x_i$.<br/>3. Replace every right-hand-side of length >2 by a series of productions, each with right-hand-side of length 2.",
        "question": "Are we done?",
        "answer": "Yes",
        "choices": ["Yes", "No"]
      }
    }
  }
}
