Questions
CSCI4520Programing Project for algorithm analysis: Sorting, searching, and efficiency analysis Project introduction In the project, you...

CSCI4520Programing Project for algorithm analysis: Sorting, searching, and efficiency analysis

Project introduction In the project, you will apply the theory in the class to actual computer simulation to verify your results. Project Description You will simulate the procedure of search, sorting by programming and analyze the efficiency based on the computer simulation and theoretical result.

1.Generate 100000positive numbers between (0,150)

2.Search the position of the first “58”in the array

3.Count how many “58”inthe array

4.After you finished the first three steps,sort the array by the one required algorithm.

5.Repeat step 3 on the sorted array

6.Compute the time cost difference between the time from step 3 only, and time from step 4 and 5 together.

7.Run your program three times and calculate the time:

1)The time to generate 100000#

2)The time to search the element 58s

3)The time to count the 58’s

4)The time to sort the array

Project Learning Objectives • Students will be knowledgeable of the concepts and techniques of computation • Develop code and understanding software life cycle. • Familiar with algorithm efficiency analysis Computer Programming Learning Objectives Students will enhance knowledge in following areas: • Arrays (Bounded) • Algorithm design • Data structure • Interface design • Graphic user interface design Learning Objectives • Upon the successful completion of the project, the students will gain a better understanding of following course concepts • The efficiency analysis of algorithms • The student will enhance the knowledge and skills in writing a well-documented Java program with object oriented concepts involved Program structure The program should include the following sections: • Algorithms design: Describe the algorithm in pseudocode• Implementation of the algorithm: The code to realize the algorithms• The efficiency analysis of the algorithm: The time and space efficiency

In: Computer Science

Question: An outbreak of betacoronavirus severe acute respiratory syndrome (SARS)-CoV-2 began in Wuhan, China in December...

Question:

An outbreak of betacoronavirus severe acute respiratory syndrome (SARS)-CoV-2 began in Wuhan, China in December 2019. COVID-19, the disease associated with SARS-CoV-2 infection, rapidly spread to produce a global pandemic. Since then many scientists around world try to understand the mechanism of the virus. One of the very important questions that the scientists are asking is that why there is a difference with respect to severity of the disease between infected individuals. We know some factors such as people with advanced age or underlying health conditions such as heart disease and diabetes are more likely to develop severe symptoms. But those do not explain the whole story, because there are plenty of young and healthy individuals with severe symptoms or old individuals with underlying health conditions with mild symptoms. Why might that be? Could genetics play a role? Because we know from past experiences that genetics is associated with susceptibility to infectious diseases such as particular HBB variants make people less susceptible to malaria, or particular CCR5 variants can protect people from HIV infection, or particular FUT2 variants prevent people to be infected by norovirus.

So, a) Please discuss the molecular mechanisms of the novel coronavirus and decide which human genes are possible candidates of most likely to influence severity of the disease.

b) Please discuss if the geographical location could affect the severity of the disease in terms of genetic variation and evolutionary migration patterns of humans.

Specific Instructions:  Provide at least 3 references in an appropriate format.  Use only scholarly research papers for referencing (magazines, blogs, and websites are not allowed).  Plagiarism or quotations are not allowed.  Word count scale: Minimum 200 words.

Please anyone?

In: Biology

Multiple choice: All of the following statements about evolution are true except: A) It is a...

Multiple choice: All of the following statements about evolution are true except:

A) It is a change in the frequency of particular alleles within a population over time.

B) Every mutation occurring in an organism’s DNA leads to genetic changes that are beneficial and adaptive.

C) When an animal selects a mate based on particular features or behaviors, the offspring that result will be better adapted than would those arising from a purely random mate choice.

D) Darwin’s theory of evolution easily accounts for simple refinements in form (i.e., adaptations); however, novel or dramatic changes in form require an understanding of modern discoveries taken from cell and molecular biology.

Multiple choice: The phrase “ontogeny recapitulates phylogeny”:

A) Explains why developmentally, human hearts don’t form directly having 4-chambers, rather they undergo a sequential formation that begins with 2, then 3, then 4 chambers.

B) Is used to explain why all chordates, including humans have gills at some time during their embryonic development.

C) Supports the idea that physical features you acquire during your lifetime can be passed on to your offspring.

D) Has been entirely rejected by the scientific community as an obsolete idea.

E) a and b

Choose the FALSE statement:

A) Relative to the fossil record or comparative morphology, the closeness of the evolutionary relationship between humans and chimpanzees is most clearly demonstrated by comparing their DNA sequences.

B) The idea that “ontogeny recapitulates phylogeny” provides a basis for studying an organism’s evolutionary history by examining the details of its embryonic development.

C) Fossilization is such a common occurrence in nature that we should expect to find a complete record of the entire history of life going back at least 3.5 billion years.

In: Biology

10. A patient calls the clinic’s answering service stating she missed her morning dose of dabigatran,...

10. A patient calls the clinic’s answering service stating she missed her morning dose of dabigatran, which she usually takes twice daily at 8 a.m. and 8 p.m. It is 5 p.m. when she calls for advice. What advice should the nurse practitioner give the patient?

a. Take the missed dose now and then resume the usual schedule with the 8 p.m. dose.

b. Take the missed dose now and then reset the usual regimen to 5 a.m. and 5 p.m., maintaining a 12-hour interval.

c. Take two capsules at 8 p.m. and then resume the normal dosing schedule.

d. Forgo the morning dose because it is less than 6 hours from the next scheduled dose and then resume the normal dosing schedule with the 8 p.m. dose.


11. The duration of venous thromboembolism (VTE) treatment should be extended if the patient

a. has a positive d-dimer.

b. is female.

c. is of advanced age.

d. has renal failure.


12. Which of the following therapies is matched to its approved indication?

a. Argatroban: venous thromboembolism (VTE) prophylaxis

b. Unfractionated heparin (UFH): heparin-induced thrombocytopenia (HIT)

c. Bivalirudin: percutaneous coronary intervention (PCI)

d. Enoxaparin: ST-segment elevation myocardial infarction (STEMI)


13. There is an increased risk of limb gangrene and skin necrosis in patients with heparin-induced thrombocytopenia (HIT) who are initially anticoagulated with

a. a novel oral anticoagulant (NOAC).

b. dalteparin.

c. warfarin.

d. argatroban.


14. A supplemental anticoagulant is needed to prevent catheter-related thrombosis in a patient being treated for acute coronary syndrome (ACS) with

a. unfractionated heparin (UFH).

b. dalteparin.

c. fondaparinux
d. bivalirudin.

In: Nursing

31) Adaptation is different from the term acclimatization. Which of the statements below best describes what...

31) Adaptation is different from the term acclimatization. Which of the statements below best describes what acclimatization means? A) Adjustments made by the Laura, the mountain climber (whose ancestors did not evolve in high altitudes) can be passed on to her children. B) Laura, the Mountain climber (whose ancestors did not evolve in high altitudes) can adjust to the low oxygen pressure by producing a different hemoglobin which has a higher affinity to oxygen. C) Laura, the Mountain climber (whose ancestors did not evolve in high altitudes) can adjust to the low oxygen pressure by upregulating expression of the hemoglobin gene (making more hemoglobin). D) Acclimatization describes how Tibetan Sherpas are better able to handle the low oxygen pressures because they produce a hemoglobin with higher oxygen affinity and they pass this gene to offspring.

32) Bats and birds both have wings, but they are not a result of common ancestry. This is called A. divergent evolution B. convergent evolution C. fitness tradeoff D. gene correlation

33) Skin color is a biological adaptation based on A. Protecting against cancer. B. One's ability to dissipate heat. C. Resistance to malaria. D. Protecting Vits B and D for reproductive purposes.

34) Spark Therapeutics is a company in Philadelphia which has developed a cure for blindness. They have achieved this by giving the patients (with the mutated gene) a good allele of the gene. This is called A. CRISPR B. stem cell therapy C. gene therapy D. CAR-T

35) A novel approach to treating cancer is to use genetically engineered immune cells which can recognize and kill cancer cells. This therapy is called _____. A. CAR-T B. magic bullet C. antisense technology D. Opdivo

In: Biology

You are the brewmaster at a local craft brewery. In an effort to cut costs, you...

You are the brewmaster at a local craft brewery. In an effort to cut costs, you have been tasked to develop a procedure to recover the carbon dioxide generated during the fermentation process. This recovered carbon dioxide will be used to later carbonate the beer before it is bottled. During fermentation, sucrose (C12H22O11) dissolved in water is broken down into ethanol (CH3CH2OH) and carbon dioxide by yeast. The carbon dioxide is then released into the space above the reaction where it is then captured using your novel device. To test your recovery method, you sprinkle 22 g of dry yeast into a rigid glass container that contains 10 gallons of water (1 gallon=3.78 liters). Then you add 4.5 kg of sucrose to simulate the wort (the sugary liquid that will be fermented into beer). The volume of the rigid glass container is 10.5 gallons and the fermentation temperature is controlled using a water bath set to 25°C.

a) Write a balanced equation for the fermentation process, including phases of each compound.

b) Calculate the volume of carbon dioxide that is released by the fermentation of 4.5 kg of sucrose. You can assume that the carbon dioxide is collected and kept at a constant pressure of 1 atm in a storage tank.

c) To properly carbonate your 10 gallon batch of beer, you need approximately 100 L of carbon dioxide at 1 atm. How many batches of beer can you carbonate with the amount of carbon dioxide generated by your experiment?

d) How much ethanol is produced during the fermentation of 4.5 kg sucrose. Express your answer in gallons.

e) Calculate the amount of heat generated by the fermentation of 4.5 kg sucrose. Express your answer in kJ.

In: Chemistry

You are recently hired in the Research firm where you got the assignment on forming a...

You are recently hired in the Research firm where you got the assignment on forming a Capital Market Expectations. However, recent pandemic impede the growth numbers each of the business sector. State bank of Pakistan taken the significant measure to combat with the ongoing situation of Pakistan due to novel coronavirus. Your research head assigned you a task which is related to writing a brief report on “Revival of Economic Growth of Pakistan” which are mentioned below:-

  1. Describe the inflationary pressure on Pakistan economy along with its future outlook with forecast of future monetary policy rate.
  2. Pakistan Current Account came into surplus so what type of measures Govt. has taken to control the current account deficit, further, compare the last govt. period with incumbent govt. steps for improving the Pakistan economy.
  3. What are the key determinants of PKR/USD rate and your view on future rate whether it’s going to devalue further or strengthen PKR against dollar?
  4. Most importantly, net exports impact on the growth of Pakistan economy.
  5. Lastly, you have to include the banking channel liquidity constraints due to Covid-19 and what steps SBP has taken for smooth operational efficiency of banks. (hint: CASA deposits, Advance to deposit ratios, Capital adequacy rate, liquidity coverage ratio and net stable funding ratios)

Instructions:

you need write a brief report (200 words) based on the data you have gathered what would be your analysis regarding the interest rate forecast keeping in mind the economic circumstances and international restrictions on Pakistan?

In: Finance

Fostering Innovation This activity is important because as a manager, you must be able to create...

Fostering Innovation This activity is important because as a manager, you must be able to create an atmosphere that encourages employee creativity, learning and exploration. This in turn improves the company’s ability to effectively respond to opportunities and threats. The goal of this exercise is to demonstrate your understanding of the steps managers can take to encourage innovation so employees can solve problems and create distinctive new products and services. Hover cursor over the names to read the description and then drag it to the characteristic that creates innovation in a company.

Creativity:

Learning organization:

Intraprenerurship:

------------------------------------------------------------------------------------------- Each need to go to one of the above categories.

Facebook: Encourages empoyees to experiment and even make mistakes

Logan: Was just given six months sabbaatical from her current job to lead the creation and launch of a new servie she recommended.

Jordan: encourages departmental teams to share both successes and failures with the larger organization

Jennifer: is very excited that the company wants her develeop personal mastery by experimenting, creating, and exploring what she wants

Rewards: some companies use contests, rewards, and even time off to encourage employees to generate and share new ideas

Bailey: works diligently to make sure the team understands and shares the organization's vision.

Jonathan: is not allowed to explore his ideas for imporoving the company's product, he may leave and start his own company offering a competing product.

Google:As part of its hiring process, google asks prosective brain teaser questions to see if candidates respond with original novel ideas.

Jorge: has been designated as the product champion for the company's fledgling new product.

In: Operations Management

In the original flashcard problem, a user can ask the program to show an entry picked...

In the original flashcard problem, a user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting.

A sample session might run as follows:

Enter s to show a flashcard and q to quit: s Define: word1 Press return to see the definition definition1 Enter s to show a flashcard and q to quit: s Define: word3 Press return to see the definition definition3 Enter s to show a flashcard and q to quit: q

The flashcard program is required to be extended as follows:

Box 1 – Specification of extended problem

There are now two glossaries: the ‘easy’ and the ‘hard’.

The program should allow the user to ask for either an ‘easy’ or a ‘hard’ glossary entry. If the user chooses to see an ‘easy’ entry, the program picks an entry at random from the easy glossary and shows the entry. After the user presses return, the program should show the definition for that entry.

If the user chooses to see a ‘hard’ entry, the program picks an entry at random from the hard glossary and shows the entry. After the user presses return, the program should show the definition for that entry.

The user should be able to repeatedly ask for an easy or a hard entry or choose an option to quit the program.

A sample dialogue might run as follows. Changes from the original flashcard program are indicated by underlining. word3 is from the ‘easy’ glossary, word6 from the ‘hard’ glossary.

Enter e to show an easy flashcard, h to show a hard one, and q to quit: e Define: word3 Press return to see the definition definition3 Enter e to show an easy flashcard, h to show a hard one, and q to quit: h Define: word6 Press return to see the definition definition6 Enter e to show an easy flashcard, h to show a hard one, and q to quit: q

Box 2 – Keeping a notebook

As you work through part (a) of this question you should keep a notebook. You will need this for your answer to part (a)(vi). This should be very brief: it is simply a record of your personal experience while working on the task and what you feel you have learned from it.

In your notebook we suggest that you record the following information:

How A brief description of how you went about the task.
Resources What documentation, if any, you consulted (including course materials and any online sources) and which you found most useful. There is no need for full references, just note the source, and – in the case of the course materials – what the relevant part and section or activity was.
Difficulties Anything you found difficult about the task, and how you dealt with it.
Lessons learnt Anything you learned from the task that would be useful if you faced a similar problem in the future.

There is more than one way of solving the extended problem, but the approach we ask you to follow for this TMA starts by addressing the subproblem of showing a random entry from either the easy or the hard glossary and, after the user enters return, showing the definition. The algorithm should select which glossary to use depending on the user's input.

  • a.

    • i.Begin by writing an algorithm for the subproblem, show definition, described in the middle paragraph of Box 1 above, and repeated here for convenience:

      The program should allow the user to ask for either an easy or a hard glossary. If the user chooses to see an easy entry, the program picks an entry at random from the easy glossary and shows the entry. After the user presses return, the program should show the definition for that entry.

      If the user chooses to see a hard entry, the program picks an entry at random from the hard glossary and shows the entry. After the user presses return, the program should show the definition for that entry.

      At this stage, no looping is involved and the steps of the algorithm only need to do what is asked for in the paragraph above and nothing more. Your algorithm will need to cater for the two variables of the user asking for either an easy or a hard entry.

      The steps of your algorithm must be written in English and not use any Python code. The algorithm should be high-level and at a similar level of detail to the solution to Activity 2.24 of Block 3 Part 2, where an algorithm is given for show flashcard.

    • ii.Next you will translate your algorithm into Python code.
    • Modify the function show_flashcard() so it translates into Python the steps of the algorithm you wrote in Part (i). You can assume the user's choice is stored in the variable user_input and is either 'e' or 'h' for easy or hard respectively.

      Make sure you write a suitable docstring for the function.

      Copy your modified show_flashcard() function and paste it into your Solution Document.

    • iii.When you have modified the show_flash card() function, test it as follows.

      Run the program and, when asked to make a choice, immediately enter q so the program quits.

      Although the program has quit, the function is still loaded into memory and can be called from the shell. To test it, first set the value of user_input to 'e'

      >>> user_input = 'e'

      Now call the function

      >>> show_flashcard()

      If the function is correct, this should display one of the ‘easy’ words: word1, word2 or word3, followed by Press return to see the definition.

      Repeat this process but this time set the value of user_input to 'h' and check that now the word displays one of the 'hard' words: word4, word5 or word6.

      Debug the code and/or algorithm as necessary. If you need to make modifications, you should record them in your notebook.

      Copy and paste two example tests into your Solution Document. The first test should show the result of user_input being set to 'e', the function being called, and the user pressing return. The second test should show the result of user_input being set to 'h', the function being called, and the user pressing return.

      Alternatively, if you were unable to get the function working correctly, you should still paste in example tests and explain briefly how the results are different from what you were expecting.

    • iv.Now you need to make changes to the part of the program that implements the interactive loop, so the user is offered a choice between entering 'e' for an easy entry, 'h' for a hard entry, or 'q' to quit.

      If the user enters either ‘e’ or ‘h’, the show_flashcard() function should be called. The function will then show a random entry from either the easy or hard glossary, depending on which of the two the user chose, which will have resulted in user_input being set to the corresponding value.

      If the user enters ‘q’, the program should quit as before.

      If the user enters anything else, the program should print a message reminding them what the possible options are.

      Once you have made the changes, run the whole program. Copy a test dialogue into your Solution Document to show the user first choosing to see an 'easy' entry, then a 'hard' one, then entering an invalid option, and finally entering 'q' to quit the program.

      Alternatively, if you were unable to produce a test dialogue because you could not get the program to function as intended, you should briefly explain how a successful test dialogue would look.

    • v.Next, modify the docstring for the program as a whole to reflect the changes you have made.

In: Computer Science

Case Study: Furniture Fire [from McClave, Benson, and Sincich 1998] "A wholesale furniture retailer stores in-stock...

Case Study: Furniture Fire [from McClave, Benson, and Sincich 1998] "A wholesale furniture retailer stores in-stock items at a large warehouse located in Tampa, Florida. In early 1992, a fire destroyed the warehouse and all the furniture in it. After determining the fire was an accident, the retailer sought to recover costs by submitting a claim to its insurance company."

"As is typical in a fire insurance policy of this type, the furniture retailer must provide the insurance company with an estimate of 'lost' profit for the destroyed items. Retailers calculate profit margin in percentage form using the Gross Profit Factor (GPF). By definition, the GPF for a single sold item is the ratio of the profit to the item's selling price measured as a percentage, i.e. Item GPF = (Profit/Sales price) x 100 Of interest to both the retailer and the insurance company is the average GPF for all of the items in the warehouse. Since these furniture pieces were all destroyed, their eventual selling prices and profit values are obviously unknown.

One way to estimate the mean GPF of the destroyed items is to use the mean GPF of similar, recently sold items. The retailer sold 3,005 furniture items in 1991 (the year prior to the fire) and kept paper invoices on all sales. Rather than calculate the mean GPF for all 3,005 items (the data were not computerized), the retailer sampled a total of 253 of the invoices and computed the mean GPF for these items. The 253 items were obtained by first selecting a sample of 134 items and then augmenting this sample with a second sample of 119 items. The mean GPFs for the two subsamples were calculated to be 50.6% and 51.0%, respectively, yielding an overall average GPF of 50.8%. This average GPF can be applied to the costs of the furniture items destroyed in the fire to obtain an estimate of the 'lost' profit." "

According to experienced claims adjusters at the insurance company, the GPF for sale items of the type destroyed in the fire rarely exceeds 48%. Consequently, the estimate of 50.8% appeared to be unusually high. (A 1% increase in GPF for items of this type equates to, approximately, an additional $16,000 in profit.) When the insurance company questioned the retailer on this issue, the retailer responded, 'Our estimate was based on selecting two independent, random samples from the population of 3,005 invoices in 1991. Since the samples were selected randomly and the total sample size is large, the mean GPF of 50.8% is valid.

A dispute arose between the furniture retailer and the insurance company, and a lawsuit was filed. In one portion of the suit, the insurance company accused the retailer of fraudulently representing their sampling methodology. Rather than selecting the samples randomly, the retailer was accused of selecting an unusual number of 'high profit' items from the population in order to increase the average GPF of the overall sample.

To support their claim of fraud, the insurance company hired a CPA firm to independently assess the retailer's 1991 Gross Profit Factor. Through the discovery process, the CPA firm legally obtained the paper invoices for the entire population of 3,005 items sold and input the information into a computer. The selling price, profit, profit margin, and month sold for these 3,005 furniture items are available" on the assignment page in Learning Suite (in Stata format), and are described on a page linked in Learning Suite.

Your objective in this case is to use these data to determine the likelihood of fraud. Is it likely that a random sample of 253 items selected from the population of 3,005 items would yield a mean GPF of at least 50.8%? Or, is it likely that two independent, random samples of size 134 and 119 will yield mean GPFs of at least 50.6% and 51.0%, respectively? (These were the questions posed to a statistician retained by the CPA firm.) Use the ideas of probability and sampling distributions to guide your analysis." You are working as clerk (with statistical expertise) for a judge (without statistical expertise).

Prepare a professional memo which presents the results of your analysis and gives your opinion regarding fraud. Be sure to describe the assumptions and methodologies used to arrive at your findings." Assume that your audience--the judge--has only a vague familiarity with statistics (i.e., he/she is a layperson)

Variable Type Description

Month QL month in which item was sold in 1991

Invoice QN Invoice Number

Sales QN Sales Price of item in dollars

Profit QN Profit amount of item in dollars

Margin QN Profit margin of item = (profit/Sales) * 100%

In: Economics