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

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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