Rank the list elements in terms of distance, Computer Engineering

Assignment Help:

Q. Rank the list elements in terms of distance?

Rank the list elements in terms of distance from each to last element in given linear linked list.

A parallel algorithm for this problem is given below. The algorithm presumes there are p number of processors.

Algorithm:

Processor j, 0≤ j

if next[j]=j then 

rank[j]=0

else rank[j] =1

endif

while rank[next[first]]≠0 Processor j, 0≤ j

rank[j]=rank[j]+rank[next[j]]

next[j]=next[next[j]]

endwhile

The working of above algorithm is explained by the diagram below:

1844_Rank the list elements in terms of distance.png

Figure: Finding rank of elements


Related Discussions:- Rank the list elements in terms of distance

Why are arrays usually processed with for loop, The real power of arrays co...

The real power of arrays comes from their facility of using an index variable to traverse the array, accessing every element with the similar expression a[i]. All the is required t

Queue depth should be greater than zero, Tell me which queue having present...

Tell me which queue having present queue depth should be greater than zero? Ans) Event queues Open MQ Explorer by selecting Start > Programs > IBM WebSphere MQ > WebSphere

Numbers of students must be integer, A school district has I neighbourhoods...

A school district has I neighbourhoods, J schools and G grades at every school. Every school j has a capacity of C jg for grade g. In every neighbourhood i, the student population

Simplify the expression by using karnaugh map, Simplify   the   following  ...

Simplify   the   following   expression   into   sum   of   products   using   Karnaugh   map F(A, B, C, D) = ∑ (1,3,4,5,6,7,9,12,13) Ans. Simplification of the giv

By which analog signal combine with a carrier frequency, Analog signals can...

Analog signals can be              by combining them with a carrier frequency (A)  Carried                                      (B)  Transported (C)  Multiplexed

Designing e-cash based system, How can it be achieved in designing e-cash b...

How can it be achieved in designing e-cash based system? E-cash is essentially an online solution.  The buyer must validate the coins by the issuer in order to get the purchase

Determine 8-input multiplexer IC in the TTL family, The commercially availa...

The commercially available 8-input multiplexer integrated circuit in the TTL family is ? Ans. In TTL, MUX integrated circuit is 74153.

difference among primary and secondary storage device, In primary storage ...

In primary storage device the storage capacity is fixed. It has a volatile memory. In secondary storage device the storage capacity is not limited. It is a nonvolatile memory. Prim

What do you mean by system calls, What do you mean by system calls? Sys...

What do you mean by system calls? System calls give the interface among a process and the operating system. When a system call is executed, it is treated as by the hardware as

Discuss about os as system software, Discuss about OS as system software? ...

Discuss about OS as system software? OS is a large program or actually a collection of routines that is used to control the sharing of and interaction between various computer

Write Your Message!

Captcha
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