For this Discussion sketch a plan about the handling of cust
For this Discussion, sketch a plan about the handling of customer informationa very touchy subject in the office. Some information will be stored in files on the local server, while other information will need to be stored on the user\'s local machine in the form of cookies. Identify two specific types of data that should be stored in cookies and two other pieces of information that should be stored on the server. Explain why you chose where to store the information, citing the textbook or other research sources to support your decision. Next, construct a few lines of code that may be used to store the information properly on the new website. Briefly describe all variables and functions.
Solution
These refer to how long it takes a program to run. Problems in class P can be solved with algorithms that run in polynomial time.
 
 Say you have an algorithm that finds the smallest integer in an array. One way to do this is by iterating over all the integers of the array and keeping track of the smallest number you\'ve seen up to that point. Every time you look at an element, you compare it to the current minimum, and if it\'s smaller, you update the minimum.
 
 How long does this take? Let\'s say there are n elements in the array. For every element the algorithm has to perform a constant number of operations. Therefore we can say that the algorithm runs in O(n) time, or that the runtime is a linear function of how many elements are in the array.* So this algorithm runs in linear time.
 
 You can also have algorithms that run in quadratic time (O(n^2)), exponential time(O(2^n)), or even logarithmic time (O(log n)). Binary search (on a balanced tree) runs in logarithmic time because the height of the binary search tree is a logarithmic function of the number of elements in the tree.
 
 If the running time is some polynomial function of the size of the input**, for instance if the algorithm runs in linear time or quadratic time or cubic time, then we say the algorithm runs in polynomial time and the problem it solves is in class P.
 
 
 NP
 
 Now there are a lot of programs that don\'t (necessarily) run in polynomial time on a regular computer, but do run in polynomial time on a nondeterministic Turing machine. These programs solve problems in NP, which stands for nondeterministic polynomial time. A nondeterministic Turing machine can do everything a regular computer can and more.*** This means all problems in P are also in NP.
 
 An equivalent way to define NP is by pointing to the problems that can be verified in polynomial time. This means there is not necessarily a polynomial-time way to find a solution, but once you have a solution it only takes polynomial time to verify that it is correct.
 
 Some people think P = NP, which means any problem that can be verified in polynomial time can also be solved in polynomial time and vice versa. If they could prove this, it would revolutionize computer science because people would be able to construct faster algorithms for a lot of important problems.

