In the case of T(n) = n, say O(n), and n is 1000, then on the old computer 1 minute and the new one, 1/1000 minute
For T (n) =n3, the size will be 1000^3 = 1000,000,000 which takes 1000,000 minutes on the old computer and 1000 on the new one
For T(n)=10n Because of the limited space, I won�t write
1000 ZEROs here, instead it�s clear that it takes 10^997 minutes on the old computer, and 10^994 minutes on the new one.
CIS 360- Algorithms and Data Structures- Homework 1
Submitted by Arsalan Hafiz (01498800)
DATE: 9/15/2014
1. Write an algorithm that finds the m smallest numbers in a list of n numbers.
(Chapter 1, Exercise 2)
Solution:
FOR EACH i in A[i]
j = i + 1
FOR EACH j in A[j]
IF A[i] < A[j] THEN temp = A[i]
A[i] = A[j]
…show more content…
Algorithm 2:
• Definition of Basic Operation:
We are using two FOR Loop to traverse the input and create a 2 dimensional array for printing the output.
• Every-Case Time Complexity: Yes this algorithm does have an every case time complexity, it is // *n for each for loop T (n) = n + n = 2n = n (ignoring the constant)
4. Compare algorithms. Chapter 1, Exercise 14, page 44.
Algorithm 1:
• To run the algorithm once The fixed cost would be: 4 hours * $20/hour = $80
• The cost of running the program (CPU Cost): n2 microsecond = (500)2 microsecond = 250,000 microsecond = 250 second We need to change seconds in to minutes to get runtime cost in min/hour ((250seconds * 1min) / (60seconds)) * $50/min = $208
• Run the algorithm n times Q₁ (n) = 80 + (250/60) * 50n
Algorithm 2:
• To run the algorithm once Fixed cost: 15 hours * $20/hour = $300
• The Cost of CPU Runtime: 100n (logn) = 100 * 500 * (log500) = 134948 microseconds = 135 seconds We need to change seconds into minutes to get runtime cost in min/hour ((135 seconds*1min) / (60 seconds)) * $50/min = $112.5
• Run the algorithm n times Q₂ (n) = 300 + (135/ 60) * 50x Q₁ (n) = Q₂ (n) 80 + 208n = 300 +
…show more content…
5. Group the functions by complexity category. Find the complexity category for each function and sort the categories by increasing growth rate.
Solution:
Complexity category for functions and Sorting the categories by increasing growth rate from Low to High:
• O((Log n)2)
• O(n) , O (n)
• O(n log (n))
• O( √n
Science peer review is important with the role that it plays in the experiment. It helps confirm the research, establish a method to be evaluated, and increase different kinds of possibilities within research groups. There are three types of peer review such as single blind, double blind and open review. Single blind is where only the participate doesn’t know if they are in the controlled group or treatment. Double blind is when both the participate and the experimenter are kept in the dark. An open blind is where both sides
During my semester off in spring of 2012, I was in China taking care of my paternal grandfather who passed away from lung cancer the April of that year. I was raised by my paternal grandparents and was really close to him. While I was in China, I volunteered at the Fujian Medical University Affiliated First Hospital. I mainly worked in the pediatric ward where I assisted physicians as they went on their rounds and helped with physican exmainations and took down medical history. I also served as translator for patients and families that spoke English. That summer I shadowed Dr Simon Chang, a Radiation Oncologist at the New York Presbyterian Hospital.
On 06/16/2018 at about 2345 hours, Officer Deltoro (P#2509) and I were dispatched to 4812 Crystal Sword Street in reference to a 911 disconnect. While en route North Las Vegas Dispatch advised a male and female could be heard in the background yelling.
In the midst of September 2013, I began volunteering at The Valley Hospital as a pharmacy department assistant. My primary task while attending two-hour shifts was to organize the medicine returned by doctors into specific compartments. Along with that I also had the responsibility to empty medicine carts and associate them into boxes for the next volunteers to organize after I finished my shift. Sometimes, one of the pharmacists available would instruct me to open boxes of saline solutions, tape the appropriate nozzle shut, and use a “price gun” to print appropriate dates on each bag. During this entire experience, I have learned to have responsibility and to act in a mature manner when working alongside pharmacists who are so talented in
As an Arab immigrant who was raised in the United States since he was seven years old, who lived in Michigan seeing Arabs everyday and never felt like he was in a foreign country; and moving to NYC in 2015, changed the whole style of my life. NYC the tremendous city that I couldn’t find the people that I knew and that I understood nor those that understands me because of our massive cultural differences, and believes. The biggest problem is when I started school in NYC. The school system was different because in NYC they had regents, also their credit requirements were different, for that I was behind in credits and didn’t know what was the regents. Also, I came to school almost at the end of the First marking period of the second semester of freshman year.
I made one other staff application before on a server called PowerCraft. I was fortunate enough (and lucky enough) to actually come through. The staff application format over at PowerCraft's website was similar to the format on this
After completing this assignment, I feel as though the way I think and my outlook on certain things has changed in small, yet significant ways. For example, one of the most interesting myths, myth 28 (There’s Safety in Numbers), has changed the way I will react in situations of emergency. Having the awareness of the tendency to ignore someone in need when in a crowd will help me to overcome that tendency and actually help. I also found myths 15 (IQ Tests Are Biased against Certain Groups of People) and 20 (Researchers Have Demonstrated That Dreams Possess Symbolic Meaning) very interesting. I held some belief that dreams meant something more than just the random occurrences we see, so knowing they hold no insight into our minds and psyches makes me feel less distrait. As for myth 15, I simply found it amazing that so many people would rather blame the IQ tests for the inconsistencies in scores, rather than look deeper and take responsibility for the social disadvantages and prejudices against groups.
There is sufficient fake news today that validation of certain packets of SOCMINT might have to simply be thrown on the back burner. There is so little fact checking anyways so one implication is that SOCMINT will be directed to the final user and mass-disseminated if it must reach a large group with the ever present stamp “take this with a grain of salt” or “rumor has it…” The benefit of seeing the big picture remains and patterns can still be detected. “The massive sample size creates something of a normalizing effect and enables higher confidence levels in the inferring of trends, anomalies and patterns which might normally escape notice with small datasets, with implications for future predictions.” (Lim, 2015. 4).
I met my best friend Briana Williams when I was eight years old, in the second grade at Flat Rock Elementary School. Ms. Wyatt our second grade teacher would always line us up next to each other because we were both about the same height. Before you knew it we began forming a friendship.
In-game username: My current In-Game Username is MrBubblyNaruto, I have no intention of changing it.
1 score and 5 years ago I was asked to write a paper about today. Surprisingly I was spot on. Thanks to my family and all my teachers throughout my college years I am a successful Audio Engineer. I started off this journey 26 years ago in 2014 after being released from a prison program called Miami-Dade County Boot Camp. There I learned the discipline it takes to be successful at anything you want to do in your life.
•What sources did you use most in your reading? How did you find these sources?
For this assignment, I was allowed to improvise on a provided base code to develop a functioning web crawler. The web crawler needed to accept a starting URL and then develop a URL frontier queue of “out links” to be further explored. The crawler needed to track the number of URLs and stop adding them once the queue had reached 500 links. The crawler needed to also extract text and remove HTML tags and formatting. The assignment instructions offered using the BeautifulSoup module to achieve those goals, which I chose to do. Finally, the web crawler program needed to report metrics including the number of documents (web pages), the number of tokens extracted and processed, and the number of unique terms added to the term dictionary.
By furthering my qualifications and teaching Communications maintenance school, I have had a fleet wide impact on the supervisors of each communications division. Additionally, being selected as Instructor of the Year FY 2015 and Department MTS Coordinator I have more influence on the daily operations of NAVSUBSCOL as a whole. I am applying for the LDO program to further extend this influence. I am a hard charging individual that leads by raising the standards and demanding it from others to follow, this is why I was ranked #1 out of 85 in my command. I am highly competent, computer savvy and well educated sailor that has always desired to be part of the LDO community.
In insertion sort, the best case is not quadratic because it only has to verify each entry once since it would have nothing to insert. The algorithm would just read through the array once and see that it is already sorted. Selection sort must check each entry twice to verify that the array is correctly sorted in the best