{
  "translations": {
    "en": {
      "direction": {
        "type": "multiple",
        "description": "",
        "question": "A DFA can proccess inputs from left to right OR right to left.",
        "answer": [
          "False"
        ],
        "choices": [
          "True",
          "False"
        ],
        "correctFeedback": ["A DFA can only start at the left (the first letter of the input string) and move to the right (the last letter of the input string)."]
      },
      "readonly": {
        "type": "multiple",
        "description": "",
        "question": "DFAs can be used to add more letters to the given input.",
        "answer": [
          "False"
        ],
        "choices": [
          "True",
          "False"
        ],
        "correctFeedback": ["A DFA cannot modfiy the tape. It can only look at it or 'read' it."]
      },
      "whichstate": {
        "type": "multiple",
        "description": "Look at the DFA schematic diagram above.",
        "question": "What state is the control unit in?",
        "answer": [
          "1"
        ],
        "choices": [
          "0",
          "1",
          "2",
          "a",
          "b"
        ]
      },
      "whatdefinition": {
        "type": "select",
        "description": "We are going to talk about many DFAs. And you will build some yourself. So we need a precise definition for what a DFA actually is. Think about this a moment: What do we need to completely specify a DFA and its behavior? We want to define the DFA with the parts that are needed, and nothing more.",
        "question": "Which of the following need to be in the definition of a DFA?",
        "answer": [
          "the start state",
          "a set of final states",
          "a set of states",
          "an alphabet",
          "a set of transitions that define, given a state and a current symbol, what state to go to"
        ],
        "choices": [
          "the start state",
          "a set of start states",
          "the final state",
          "a set of final states",
          "a set of states",
          "an alphabet",
          "a language",
          "a set of transitions that define, given a state and a current symbol, what state to go to",
          "a set of transitions that define, given a state and a current symbol, what state to go to, and where to move the tape head"
        ],
        "incorrectFeedback": ["Hint: You will need exactly 5 of these things."]
      },
      "determine": {
        "type": "multiple",
        "description": "We say the DFA 'accepts' a given input string if the DFA ends processing of that string in a final state, and we say that the DFA 'rejects' if it is not in a final state at the end of processing that string.",
        "question": "[T/F] A DFA can end in different states on different runs when given the same string as the input.",
        "answer": [
          "False"
        ],
        "choices": [
          "True",
          "False"
        ]
      },
      "startfin": {
        "type": "multiple",
        "description": "We say the DFA 'accepts' a given input string if the DFA ends processing of that string in a final state, and we say that the DFA 'rejects' if it is not in a final state at the end of processing that string.",
        "question": "[T/F] The start state can also be a final state.",
        "answer": [
          "True"
        ],
        "choices": [
          "True",
          "False"
        ]
      },
      "states": {
        "type": "multiple",
        "description": "$Q$ is a set of all the states in the DFA. In our graph representation, this is the set of nodes for the graph.",
        "question": "Which of the following represents $Q$?",
        "answer": [
          "{q0, q1}"
        ],
        "choices": [
          "{q0, q1}",
          "{q1}",
          "{0, 1}",
          "q0",
          "q0, q1"
        ]
      },
      "alphabet": {
        "type": "multiple",
        "description": "$\\Sigma$ is the input alphabet, the set of symbols that can appear in the input for the DFA. In the graph, these can appear as labels on the edges.",
        "question": "Which of the following is $\\Sigma$ for this DFA??",
        "answer": [
          "{0, 1}"
        ],
        "choices": [
          "{q0, q1}",
          "{q1}",
          "{0, 1}",
          "q0"
        ]
      },
      "transitions": {
        "type": "multiple",
        "description": "$\\delta$ is the set of transtions between the states in the form $(q_i, a) \\rightarrow q_j$. In other words, a transition is defined by a state and an input symbol, and it tells what to do in that case (which is to be in some state after consuming the symbol). Transitions are represented by edges in the graph, and the labels tell what symbol(s) can be processed by that transition.",
        "question": "What is $\\delta$(q0, 0)?",
        "answer": [
          "q1"
        ],
        "choices": [
          "q0",
          "q1",
          "0",
          "1"
        ]
      },
      "delta": {
        "type": "multiple",
        "description": "$\\delta$ is the set of transtions between the states in the form $(q_i, a) \\rightarrow q_j$. In other words, a transition is defined by a state and an input symbol, and it tells what to do in that case (which is to be in some state after consuming the symbol). Transitions are represented by edges in the graph, and the labels tell what symbol(s) can be processed by that transition.",
        "question": "What is  $\\delta$(q1, 1)?",
        "answer": [
          "q0"
        ],
        "choices": [
          "q0",
          "q1",
          "0",
          "1"
        ]
      },
      "deltatable": {
        "type": "multiple",
        "description": "$\\delta$ is sometimes expressed in tabular format to show all possible transitions. $\\begin{array}{r|cc}\n      & 0  & 1 \\\\\n      \\hline\n      q0 &  &  \\\\\n      q1 &  &  \\\\\n      \\end{array}$",
        "question": "Which of these tables represents the $\\delta$ function for this example?",
        "answer": [
          "\\begin{array}{r|cc} & 0 & 1\n \\\\ \\hline q0 & q1 & q0 \\\\ q1 & q1 & q0 \\\\ \\end{array}"
        ],
        "choices": [
          "\\begin{array}{r|cc} & 0 & 1 \\\\ \\hline q0 & q0 & q0 \\\\ \nq1 & q1 & q1 \\\\ \\end{array}",
          "\\begin{array}{r|cc} & 0 & 1\n \\\\ \\hline q0 & q1 & q0 \\\\ q1 & q1 & q0 \\\\ \\end{array}",
          " \n\\begin{array}{r|cc} & 0 & 1 \\\\ \\hline q0 & q0 & q1 \\\\ q1\n & q0 & q1 \\\\ \\end{array}"
        ]
      },
      "start": {
        "type": "multiple",
        "description": "$Q_0$ is the start state of the DFA. Every DFA has to define which state to start in, so there is only one start state. We show the start state by putting a triangle 'pointing' to it.",
        "question": "Which of the following is the start state for this DFA?",
        "answer": [
          "q0"
        ],
        "choices": [
          "{q0, q1}",
          "{q1}",
          "{q0}",
          "{0, 1}",
          "q0"
        ]
      },
      "final": {
        "type": "multiple",
        "description": "$F$ is a set of all the final states. We show these states in the graph with double circles for those nodes.",
        "question": "Which of the following represents $F$ for this DFA?",
        "answer": [
          "{q1}"
        ],
        "choices": [
          "{q0, q1}",
          "{q1}",
          "q0",
          "{0, 1}",
          "q1"
        ],
        "correctFeedback": "$F$ is a set. It so happens that this DFA has only one final state (so its a set of one state). Other machines might have multiple final states."
      },
      "whygraph": {
        "type": "multiple",
        "description": "The DFA shown as a graph below can be expressed in text as: $M = (Q,\\Sigma,\\delta,Q_0,F) = (\\{q0,q1\\},\\{0,1\\},\\delta,q_0,\\{q1\\})$. We would also need to add a description for the $\\delta$ transitions.",
        "question": "Which representation makes it easier to grasp the behavior the machine? The text or the graph?",
        "answer": [
          "the graph"
        ],
        "choices": [
          "the text",
          "the graph"
        ]
      },
      "semantics": {
        "type": "select",
        "description": "A way to make it even easier to understand the behavior of a DFA is to assign semantic meaning to the states. In this example, the machine is in state $q_0$ when the digits proccessed so far make the input an odd number (the last symbol seen is '1'), and the machine is in state $q_1$ when the digits processed so far make the input an even number (the last symbol seen is '0').",
        "question": "Which of the following strings will be accepted?",
        "answer": [
          "101010",
          "111110",
          "0000",
          "01010"
        ],
        "choices": [
          "111",
          "101010",
          "111110",
          "0000",
          "01010",
          "0101001"
        ]
      },
      "null": {
        "type": "multiple",
        "description": "",
        "question": "What happens if the input is the null string?",
        "answer": [
          "It is rejected."
        ],
        "choices": [
          "It is rejected.",
          "It is accepted."
        ],
        "incorrectFeedback": ["Since the null string means that the head starts on a blank square, the decision is immediately made. And so the head has to remain in the start state."],
        "correctFeedback": ["Since the null string means that the head starts on a blank square, the decision is immediately made. And so the head has to remain in the start state. So for any DFA, the null string is accepted if and only if the start state is also a final state."]
      }
    }
  }
}
