Rесаll thаt thе dynаmiс progrаmming аlgorithm for TSP tаkеs timе O(n22n) аnd spасе O(n2n). Supposе thе сonstаnt fасtors in thеsе running timеs аrе thаt it tаkеs n22n/1010 sесonds to run аn instаnсе of sizе n, аnd thаt it usеs 8n2n bytеs of mеmory. How big а problеm саn you solvе in аt most аn hour on а сomputеr with 4×109 bytеs of mеmory? Whаt is thе limiting fасtor for this сomputаtion, timе or mеmory?
Rесаll thаt thе dynаmiс progrаmming аlgorithm for TSP tаkеs timе O(n22n) аnd spасе O(n2n). Supposе thе...
96. How many of these atoms or ions have no unpaired electrons? N, O, Nat, N3, Sc d. 4 1 а. b. 2 5 е. 3 с. Which monatomic ion most likely exists? Na2+ 97. d. N3 В+- а. b. Cat е. C12- с.
05-02-2017 CMSC 250 Problem (3): YOU write some (pseudo-)code! (90 pts) write a program in pseudocode (Similar to the code on the Big-o slides) for the following problems 1. (15 points) Given n, z1,z2,zs, 4 determine if there is a c c4 such that The program MUST run in O(m) time. 2. (15 points Given n z .z2.zs, do Two things: (1) determine if there is a ci, c2.cs,c4 such that AND (2) if there IS such a c c2,...
1. State and explain the definition of big-O. 2. Explain why we use big-O to compare algorithms. 3. Explain why binary search runs in O(log n) time. 4. Under what conditions is it possible to sort a list in less than O(nlog n) time? 5. List and explain the worst-case and average-case running times for each Vector method below: (a) insert(iterator here, Object item) (b) insertAtHead (c) insertAtTail (aka push back) (d) get(iterator here) (e) get(index i) (f) remove(iterator here)...
3b) [4 pts]+ As in the Little SearchEngine assignment, consider a hash table that stores frequencies (number of occurrences) of words in a set of documents. Words are the keys, and for each word, the associated value is an array list of (document name, frequency) pairs, in descending order of frequencies. Now suppose you are given a list of 50 words. You are asked to find all documents in the hash table in which one or more of these words...
in c++ please. thank you!
Page 4 of 4 5. Heap and heapsort: answer the following three questions. a) (1 pt) What is the definition of a max heap? | 0 b) (2 pts) When we insert an element, 5, to the following max heap, what would be the resulting max heap? Give the detailed procedure. (14) (10) c) (2 pts) Based on b), when we remove the root element in the max heap, what would be the resulting max...
Can someone help me with a function for this. Also, what BIG O notation would the function be? stock prices change from day to day. we might have: {4,-1,-2,3,5,-7,1,0,0,-2,4}. Which meant if we bought the stock after the second day, and held it for 3 days, the price would go down by 2, then up by 3, and then up by 5. If we sold it then, we would have made $6. Design an O(N2) or better (it can actually...
a.)Given the graph below from part 4.b. you are using the priority queue prims algorithm. Let the priority queue currently contains nodes A, B. What is the value of node you u=extract_min(Q). b.) Run 1 iteration of Prims while loop, showing the priority queue. 5 А E 1 10 7 2 B с D 3 4 c.) What if you read on the news prioriy queue was improved such that both update_key, and extract min became O(logʻ(n)) how would Prims,...
How do you calculate questions 1 - 8 for the data analysis
section?
A. Precipitation of CaC,O, H,O from the Salt Mixture Unknown number Trial 1 Trial 2 1. Mass of beaker (g) 59.45 59.45 5.oS Mass of beaker and salt mixture (g) 2. 3. Mass of salt mixture (g) I, oo oS 4. Mass of filter paper (g 5. Mass of filter paper and product after air-dried or oven-dried (g) 0, 35 6. Mass of dried product (g) 7....
Please solve and explain
steps
suppose 82% o all students aking a beginning p oaramming course fail to get her first program to run on firs subr his on. Con from the other and the chance each student fails on their first try is consistent. (Round answers to three decimal places.) er a group of such student nere e c students succes independent (a) If X is the number of students whose program fails on the first run, then X...