Western music uses a musical scale with equal temperament tuning, which means that any two adjacent notes have the same frequency ratio r. That is, notes n and n + 1 are related by fn+1 = rfn for all n. In this system, the frequency doubles every 12 notesan interval called an octave. a. What is the value of r? b. Orchestras tune to the note A, which has a frequency of 440 Hz. What is the frequency of the next note of the scale (called A-sharp)?

Discrete Math for Computing Andon Mathard Timothy Farage March 22 – 24 , 2016 Question of the Day If you had the option to live forever with your body in a frozen state of 30 years of age, would you take this option Certain Important Problems There is no algorithm to solve certain important problems. An algorithm is a finite sequence of well-defined instructions for solving a problem. Halting Problems Is True (string, math, proposition) Suppose we have a problem that can be solved with an algorithm, how fast can we solve it There are many different sorting methods: Slower sorting methods: Bubble Sort Selection Sort Insertion Sort Faster sorting methods: Quick Sort Merge Sort “I wrote a perfect game playing program” To do this you must write what is called a “game tree”. John von Neumann and Oskar Morgenstern created game theory, and consequently this tree. Discrete Math for Computing Aaron Maynard Timothy Farage March 22 – 24 , 2016 In chess, there is an estimated 10600possible chess games; there are only an estimated 10 particles in the entire universe. By this logic, there is not enough matter in the universe to show each game tree. This is why chess playing programs are not perfect. There is also the speed of a process to consider, even if you successfully created the perfect chess playing program, it would take forever to play. Finding the Lowest Value in an Unsorted Array int find_longest(double D[], int N) // Array D is filled with numbers, and there are N of them. For this example we // will be using student GPA’s { int index = D; for (int i = 1, i < N, i++) { if (D[i] > D[index]) index = i; } return index; } This program has the possibility of executing 2 + 3N L.O.C. Discrete Math for Computing Aaron Maynard Timothy Farage March 22 – 24 , 2016 Time Complexity Let us say we have a function f(n) Then say that f(n) is equal to O(n ) if some constant c exists such that cn > f(n) for large values of n (for some k, n > k). We would look at the highest order term, because we only are concerned about the large n. We don’t care about the number up front because we care about the growth of the function, because it is a cubic function. To say O(n ) is to say that it 3 will grow or dominate n . It tells you that the time grown in the cube of the data. Some Important Time Complexities O(n!) – Factorial Time Complexity o Displaying Permutations O(2 ) – Exponential Time Complexity o Traveling Sherman O(n ) – Cubic Time Complexity o Matrix Multiplication O(n ) – Quadratic Time Complexity o Usual Multiplication O(n log(n)) – “n log(n) o Quick / Merge Sort O(n) – Linear Time Complexity o Finding Max Element in an Unsorted Array O(log(n)) – Logarithmic Time Complexity o Binary Search O(1) – Constant Time Complexity o Average the first three elements of an array Discrete Math for Computing Andon Mthnard Timothy Farage March 22 – 24 , 2016 Base Conversions Representative decimal, binary, and hexadecimal. ^^^ There will be six problems on the test about these conversions. To convert 40 to binary (which is base 2) divide 40 by 2, and use the remainders. 40/2=0 20/2=0 10/2=0 5/2 =1 2/2 =0 1/2 =1 0 =0 The answer to this would be 101000.