Big-Oh notation: few examples - Auckland
the Big-Oh condition cannot hold (the left side of the latter inequality is growing infinitely, so that there is no such constant factor c). Example 3: Prove that running time T(n) = n3 + 20n + 1 is O(n4) Proof: by the Big-Oh definition, T(n) is O(n4) if T(n) ≤ c·n4 for some n ≥ n0 . Let us check this condition: if n3 + 20n + 1 ≤ c·n4 ...
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
Advertisement
Documents from same domain
Introduction to Weka - The University of Auckland
www.cs.auckland.ac.nzWhat is Weka? Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code.
Problem Solving with Algorithms and Data Structures
www.cs.auckland.ac.nzProblem Solving with Algorithms and Data Structures, Release 3.0 Control constructs allow algorithmic steps to be represented in a convenient yet unambiguous way. At a minimum, algorithms require constructs that perform sequential processing, selection for decision-making, and iteration for repetitive control. As long as the language provides these
When was the first computer invented?
www.cs.auckland.ac.nzIn 1968, Hewlett Packard began marketing the first mass-marketed PC and the first desktop computer, the HP 9100A. The first workstation Although it was never sold, the first workstation is considered to be the Xerox Alto, introduced in 1974. The computer was revolutionary for its time and included a fully functional computer, display, and mouse.
String Matching Algorithms - Auckland
www.cs.auckland.ac.nzOutlineString matchingNa veAutomatonRabin-KarpKMPBoyer-MooreOthers 1 String matching algorithms 2 Na ve, or brute-force search 3 Automaton search 4 Rabin-Karp algorithm 5 Knuth-Morris-Pratt algorithm 6 Boyer-Moore algorithm 7 Other string matching algorithms Learning outcomes: Be familiar with string matching algorithms Recommended reading:
Outcome, Matching, Algorithm, String, String matching algorithms
Image Filtering - Auckland
www.cs.auckland.ac.nzMedian Filtering example The following example shows the application of a median filter to a simple one dimensional signal. A window size of three is used, with one entry immediately preceding and following each entry. ... – It defines a probability distribution for noise or data.
1 Exercises and Solutions - Auckland
www.cs.auckland.ac.nz4. Assume that each of the expressions below gives the processing time T(n) spent by an algorithm for solving a problem of size n. Select the dominant term(s) having the steepest increase in n and specify the lowest Big-Oh complexity of each algorithm. Expression Dominant term(s) O(...) 5+0.001n3 +0.025n 500n+100n1.5 +50nlog 10 n 0.3n+5n 1.5 +2 ...
Gaussian Filtering - Auckland
www.cs.auckland.ac.nzThis means we can normally limit the kernel size to contain only values within three standard deviations of the mean. 5/25/2010 7 ... This is a common first step in edge detectionThis is a common first step in edge detection. The images below have been processed with a …
Python 3 – Turtle graphics - Auckland
www.cs.auckland.ac.nzLogo and Turtle graphics In 1967, Seymour Papert and Wally Feurzeig created an interpretive programming language called Logo. Papert added commands to Logo so that he could control a turtle robot, which drew shaped on paper, from his computer Turtle graphics is now part of Python Using the Turtle involves instructing the turtle to move on the
Image Filtering - School of Computer Science
www.cs.auckland.ac.nz5/25/2010 2 Median Filtering example The following example shows the applicati on of a median filter to a simple one dimensional signal. A window size of three is used, wi th one entry immediately preceding and
Related documents
Big O notation - MIT
web.mit.eduO(1) constant O(log(n)) logarithmic O((log(n))c) polylogarithmic O(n) linear O(n2) quadratic O(nc) polynomial O(cn) exponential Note that O(nc) and O(cn) are very different. The latter grows much, much faster, no matter how big the constant c is. A function that grows faster than any power of n is
Part 1: Oxidation and OH radicals - Harvard University
courses.seas.harvard.eduthe hydroxyl radical OH the nitrate radical NO the ozone molecule O 3 Hydroperoxy radicals (HO 2) are also important and the sum of HO 2 and OH is sometimes referred to as HO x. The most important oxidising species is the hydroxyl radical (OH). It is extremely reactive and able to oxidise most of the chemicals found in the troposphere.
Equation Stoichiometry Chemistry 110 - Cerritos College
www.cerritos.edu4.37g Al(OH)3. Answer _____ 5] Given the reaction: 4 C + Na. 2CO3 + N2---> 2 NaCN + 3 CO . 181 grams of sodium carbonate were added to an excess of carbon and nitrogen. After the reaction finished, 35 g of of unreacted sodium carbonate remained. a. How many moles of carbon monoxide were produced?
Makefiles, and .h files, and .c files, and .o files, OH MY!
www.cs.colostate.edu.c files, and .o files, OH MY! For projects with more complexity. (Great.. Just what we needed) 2 Breaking your program into files – main.c – stack.c – stack.h. 3 ... • the .o file does not exist – Figures out if the program needs to be re-linked • If any of the .o files changed or
Big O and Little o Notation - Carnegie Mellon University
www.stat.cmu.edutimately smaller than”: f (n)=o(1) means that f (n)/c! 0 for any constant c. Re-cursively, g(n)=o(f (n)) means g(n)/f (n)=o(1), or g(n)/f (n)! 0. We also read g(n)=o(f (n)) as “g(n) is ultimately negligible compared to f (n)”. There are some rules for arithmetic with big-O symbols: • If g(n)=O(f (n)), then cg(n)=O(f (n)) for any ...
Practice Problems on SN1, SN2, E1 & E2 - Answers
www2.chem.wisc.edu2O OH I CH3CH2O-Na+ ethanol HI NaSH DMSO HSH Br HO KOH DMSO OTs NaNH2 NH3 TsO NH3 H2N O O CH CH3 TsO acetone O O CH CH3 I SN2 E2 SN1 SN2 E2 SN2 E2 SN1 SN2. 2. For each of the chemical substitution reactions below identify the major products and whether the reaction is likely an S N1 or S N2. Br ethanol-water Br Cl 3. For each of the following ...