Working with physicists that hav an inert lattice structure

Assignment Help Data Structure & Algorithms
Reference no: EM13167879

working with Physicists that hav an inert lattice structure, and they use this for placing charged particles at regual spacing along a straight line. Thus we can model their structure as consisting of the points 1,2,3,...,n on the real line; and at each of these points j, they have a particle with charge      \(q_i\)   (each charge can be either positive or negative). The total net force on particle j, by Coulombs Law is      i} \frac{C q_iq_j}{(j-i)^2} - \sum_{j< i} \frac{C q_iq_j}{(j-i)^2}" style="margin: 5px 0px 0px; padding: 0px; border: 0px; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; vertical-align: baseline; display: block; width: 665px;">\(F_j= \sum_{j>i} \frac{C q_iq_j}{(j-i)^2} - \sum_{j< i} \frac{C q_iq_j}{(j-i)^2}\)   .

They have written a simple program to compute Fj for all j:

For j=1,2,.....,n

      Initialize Fj to 0

For i=1,2,....,n

      if i

        Add (C qi qj)/(j-i)^2 to Fj

     else  if i>j then

         Add -(C qi qj)?(j-1)^2 to Fj

     Endif

Endfor

Output Fj

Endfor

This runs on O(n^2) time. How can we improve the algorithm to get a run time of O( n log n)?

Would you implement the divide and conquer method and use merge sort? if you do how would you do that?

Please help me figure this out, I am totally new to this and just don't grasp the concepts 100% yet.

 

 

Reference no: EM13167879

Questions Cloud

The array at the index method : have an array, how do i remove an entry from the array at the index method?
How far is jareds school from the grocery store : How far is Jared's school from the grocery store? Round the answer to the nearest tenth.
What is the final temperature of the water : a 40 gram sample of water at 25 degrees celcius absorbs 500 joules of energy. what is the final temperature of the water? the specific heat of water is 4.18 joules/g degrees C.
Simulate the rolling of dice : Use a worksheet to simulate the rolling of dice. Use VlookUP function to select the outcome for each die
Working with physicists that hav an inert lattice structure : working with Physicists that hav an inert lattice structure, and they use this for placing charged particles at regual spacing along a straight line
How many moles of nh3 will be produced : Ammonia is made industrially by reacting nitrogen and hydrogen under pressure, at high temperature, and in the presence of a catalyst. The equation is N2(g)+3H2(g)---->2NH3(g). If 4.0mol of H2 react, how many moles of NH3 will be produced.
What legal right do you have to these exams : What legal right do you have to these exams? Did you create them? Did you get permission to post them? Do you have permission from the author of these detailed solutions to post them publicly?
Find the mass of acetic acid in the solution of viniger : viniger is made by adding 33 g of acetic acid to 625 g of water what is the percent by mass of acetic acid in the solution of viniger?
Write a restful web service demo example using spring mvc : Write a restful web service demo example using spring mvc

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Multiple choice - high school excel 2003

Cell E23 has a date value and you want to place that date on an invoice prefaced with the text located in B15. Determine the command to do that?

  Create a java program to arithmetic expression

Create a Java program that takes as input an infix arithmetic expression then transforms to a postfix expression and based on binary tree, it evaluates that expression.

  Explaining elementary operations used in algorithm

How many elementary operations are used in algorithm given below? The elementary operations are comparison operations (such as > and

  What is meant by application service provider

What is meant by Application Service Provider? What factors drive their emergence? How does Jamcracker fit in ASP space? Describe the Jamcracker business model.

  Use of primitives helps remove ambiguities in algorithm

Explain the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm. Describe how the use of primitives helps remove ambiguities in an algorithm's representation.

  Determine algorithm for cs curriculum consists of n courses

Determine an algorithm which works directly with this graph representation, and calculates minimum number of semesters necessary to complete the curriculum.

  Use sequential search algortithm to locate the number

These numbers should be stored in an array. Use the sequential search algortithm to locate the number entered by the user. If the number is in the array, the program should display a message.

  Taxonomy tree as its input and returns a string

Designing an algorithm that takes a taxonomy tree as its input and returns a string that contains the type of "item" (animal, plant, etc) that was found after traversing the tree.

  Algorithm for a bank account

Write algorithm to settle following question: A bank account starts out with $10,000. Interest is compounded monthly at 6 percent per year (0.5 percent per month).

  Describe open source and proprietary databases

Describe open source and proprietary databases. What are some drawbacks and benefits of each type of database?

  Create a shell script the count the number of files

Create a shell script that will calculate the number of files in your account hat were last modified five or more days ago and when you run the shell script,

  Create algorithm which generates access control matrix

Create an algorithm which generates the access control matrix A for any given history matrix H of the Chinese Wall model.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd