{
  "translations": {
    "en": {
      "expensive": {
        "type": "multiple",
        "description": "None of these is what is commonly meant when a computer theoretician uses the word <b>hard</b>. Throughout this section, <b>hard</b> means that the best-known algorithm for the problem is expensive in its running time.",
        "question": "Which of these is the most expensive running time?",
        "answer": "$O(2^n)$",
        "choices": ["$O(n)$", "$O(n \\log n)$", "$O(n^2)$", "$O(2^n)$"]
      },
      "TOH": {
        "type": "select",
        "description":"The Towers of Hanoi problem takes exponential time, that is, its running time is $\\Theta(2^n)$ on an input of $n$ disks. This is radically different from an algorithm that takes $\\Theta(n \\log n)$ time or $\\Theta(n^2)$ time. It is even radically different from a problem that takes $\\Theta(n^4)$ time. These are all examples of <b>polynomial</b> running time, because the exponents for all terms of these equations are constants.",
        "question":"Which of the following are true about the Towers of Hanoi problem?",
        "answer": ["It takes exponential time", "It is easy to write a program to solve this problem", "Its running time is $\\Theta(2^n)$"],
        "choices": ["It takes exponential time", "It is easy to write a program to solve this problem", "Its running time is $\\Theta(2^n)$", "Its running time is effectively the same as $\\Theta(n^4)$"]
      },
      "practical": {
        "type": "select",
        "description":"There is a practical reason for recognizing a distinction. In practice, most polynomial time algorithms are feasible in that they can run reasonably large inputs in reasonable time. In fact, very few algorithms have a running time with a polynomial whose exponent is much more than 2. In contrast, most algorithms requiring exponential time are not practical to run even for fairly modest sizes of input. $2^n$ gets big very quickly for even smaller sizes of $n$.",
        "question":"Which of the following are true about polynomials?",
        "answer": ["Polynomials are closed under composition and addition", "If one program with polynomial running time call another a polynomial number of times, the result is still a polynomial running time", "Most polynomial time algorithms can run reasonably large inputs in reasonable time"],
        "choices": ["Polynomials are closed under composition and addition", "If one program with polynomial running time call another a polynomial number of times, the result is still a polynomial running time", "Most polynomial time algorithms can run reasonably large inputs in reasonable time"]
      },
      "exponential": {
        "type": "multiple",
        "description":"There is a practical reason for recognizing a distinction. In practice, most polynomial time algorithms are feasible in that they can run reasonably large inputs in reasonable time. In fact, very few algorithms have a running time with a polynomial whose exponent is much more than 2. In contrast, most algorithms requiring exponential time are not practical to run even for fairly modest sizes of input. $2^n$ gets big very quickly for even smaller sizes of $n$.",
        "question":"Exponential time algorithms are usually not practical to run even for fairly modest sizes of input.",
        "answer": "True",
        "choices": ["True", "False"]
      },

      "notgray": {
        "type": "multiple",
        "description": "One could argue that a program with high polynomial degree (such as $n^{100})$ is not practical, while an exponential-time program with cost $1.001^n$ is practical.<br/><br/>But the reality is that we know of almost no problems where the best polynomial-time algorithm has high degree (they nearly all have degree three or less), while almost no exponential-time algorithms (whose cost is ($O(c^n)$) have their constant $c$ close to one.",
        "question":"So nearly all exponential time algorithms are much slower than nearly all polynomial time algorithms in practice.",
        "answer": "True",
        "choices": ["True", "False"]
      },
      "NP": {
        "type": "multiple",
        "description": "The idea of <b>guessing</b> the right answer to a problem --- or checking all possible solutions in parallel to determine which is correct --- is a called a non-deterministic choice.<br/><br/>An algorithm that works in this manner is called a non-deterministic algorithm, and any problem with an algorithm that runs on a non-deterministic machine in polynomial time is given a special name: It is said to be a problem in NP. Thus, problems in NP are those problems that can be solved in polynomial time on a non-deterministic machine.",
        "question": "A non-deterministic algorithm can be viewed as an algorithm that checks all possible solutions in parallel to determine which is correct.",
        "answer": "True",
        "choices": ["True", "False"]
      },
      "nonNP": {
        "type": "multiple",
        "description": "Not all problems requiring exponential time on a regular computer are in NP. For example, Towers of Hanoi is not in NP, because it must print out $\\Theta(2^n)$ moves for $n$ disks. A non-deterministic machine cannot <b>guess</b> and print the correct answer in less time.",
        "question":"All problems requiring exponential time on a regular computer are in NP",
        "answer": "False",
        "choices": ["True", "False"]
      }, 
      "TS": {
        "type": "multiple",
        "description": "We cannot solve this problem in polynomial time with a guess-and-test non-deterministic computer. The problem is that, given a candidate cycle, while we can quickly check that the answer is indeed a cycle of the appropriate form, and while we can quickly calculate the length of the cycle, we have no easy way of knowing if it is in fact the shortest such cycle.",
        "question":"TRAVELING SALESMAN can be solved in polynomial time with a guess-and-test non-deterministic computer.",
        "answer": "False",
        "choices": ["True", "False"]
      },
      "TSexpensive": {
        "type": "multiple",
        "description": "Unfortunately, there are $2^{|E|}$ subsets to check, so this algorithm cannot be converted to a polynomial time algorithm on a regular computer. Nor does anybody in the world know of any other polynomial time algorithm to solve TRAVELING SALESMAN on a regular computer, despite the fact that the problem has been studied extensively by many computer scientists for many years.",
        "question":"TRAVELING SALESMAN (2) can be converted to a polynomial time algorithm on a regular computer.",
        "answer": "False",
        "choices": ["True", "False"]
      },
      "NPcomplete": {
        "type": "select",
        "description": "There is a large collection of problems with this property: We know efficient non-deterministic algorithms, but we do not know if there are efficient deterministic algorithms. At the same time, we have not been able to prove that any of these problems do not have efficient deterministic algorithms. This class of problems is called NP-complete.",
        "question":"Which of the following are properties of NP-complete problems?",
        "answer":  ["They have efficient non-deterministic algorithms", "There is no known efficient deterministic algorithm for any of them", "We have been unable to prove that any of these problems do not have efficient deterministic algorithms"],
        "choices":  ["They have efficient non-deterministic algorithms", "There is no known efficient deterministic algorithm for any of them", "We have been unable to prove that any of these problems do not have efficient deterministic algorithms"]
      },
      "NPhard": {
        "type": "select",
        "description":"Define a problem to be NP-hard if any problem in NP can be reduced to it in polynomial time. Thus, an NP-hard problem X is as hard as any problem in NP. A problem X is defined to be NP-complete if <br/><br/>1. X is in NP, and<br/>2. X is NP-hard.",
        "question":"A problem X is defined to be NP-complete if",
        "answer": ["X is in NP", "X is NP-hard"],
        "choices": ["X is in NP", "X is NP-hard"]
      }


    }
  }
}

