SlideShare a Scribd company logo
1 of 5
Download to read offline
The leader algorithm (Horrigan [394]) represents each cluster using a point, known as a leader,
and assigns each point to the cluster corresponding to the closest leader, unless this distance is
above a user-specified threshold. In that case, the point becomes the leader of a new cluster.
What are the advantages and disadvantages of the leader algorithm as compared to K-means?
Suggest ways in which the leader algorithm might be improved.
Solution
(a)K-Means Clustering Advantages and Disadvantages
K-Means Advantages:
1) If variables are enormous, then K-Means the majority of the times computationally faster than
hierarchical clustering, if we stay k smalls.
2) K-Means create tighter clusters than hierarchical clustering, particularly if the clusters are
globular.
K-Means Disadvantages:
1) Hard to predict K-Value.
2) With global cluster, it didn't work fine.
3) Dissimilar initial partitions can result in dissimilar final clusters.
4) It does not work fine with clusters of dissimilar size and dissimilar density.
(b)Definition:
The difficulty of leader election is for each processor finally to decide that whether it is a leader
or not subject to merely one processor decides that it is the leader. An algorithm resolves the
leader election difficulty if:
States of processors are alienated into elected and not elected states. Once chosen, it remains as
elected.
In every implementation, precisely one processor becomes elected and the rest decide that they
are not elected.
A suitable leader election algorithm must convene the following conditions:
Termination: the algorithm should finish eventually within a finite time one leader is selected. In
randomized approaches this condition is sometimes weakened
Uniqueness: there is exactly one processor that considers itself as leader.
Agreement: all other processors know who the leader is.
An algorithm for leader election may vary in following aspects:
Communication mechanism: the processors are either synchronous in which processes are
synchronized by a clock signal or asynchronous where processes run at arbitrary speeds.
Process names: whether processes have a unique identity or are indistinguishable.
Network topology: for instance, ring, acyclic graph or complete graph.
Size of the network: the algorithm may or may not use knowledge of the number of processes in
the system.
Algorithms:
Leader election in rings:
Ring network topology
A ring network is a connected-graph topology in which each node is exactly connected to two
other nodes, i.e., for a graph with n nodes, there are exactly n edges connecting the nodes. A ring
can be unidirectional, which means processors only communicate in one direction, or
bidirectional, meaning processors may transmit and receive messages in both directions.
Anonymous rings:
A ring is said to be anonymous if every processor is identical. More formally, the system has the
same state machine for every processor. There is no deterministic algorithm to elect a leader in
anonymous rings, even when the size of the network is known to the processes. This is due to the
fact that there is no possibility of breaking symmetry in an anonymous ring if all processes run at
the same speed. The state of processors after some steps only depends on the initial state of
neighbouring nodes. So, because their states are identical and execute the same procedures, in
every round the same messages are sent by each processor. Therefore, each processor state also
changes identically and as a result if one processor is elected as a leader, so are all the others.
Randomized (probabilistic) leader election:
A common approach to solve the problem of leader election in anonymous rings is the use of
probabilistic algorithms. In such approaches, generally processors assume some identities based
on a probabilistic function and communicate it to the rest of the network. At the end, through the
application of an algorithm, a leader is selected (with high probability).
Synchronous ring:
Itai and Rodeh introduced an algorithm for a unidirectional ring with synchronized processes.
They assume the size of the ring (number of nodes) is known to the processes. For a ring of size
n, an processors are active. Each processor decides with probability of a^(-1) whether to become
a candidate. At the end of each phase, each processor calculates the number of candidates c and
if it is equal to 1, it becomes the leader. To determine the value of c, each candidate sends a
token (pebble) at the start of the phase which is passed around the ring, returning after exactly n
time units to its sender. Every processor determines c by counting the number of pebbles which
passed through.
This algorithm achieves leader election with expected message complexity of O(nlogn). A
similar approach is also used in in which a time-out mechanism is employed to detect deadlocks
in the system. There are also algorithms for rings of special sizes such as prime size and odd size.
Asynchronous ring:
In the case of asynchronous systems, the problem of leader election becomes more difficult. This
is because of the uncertainty introduced by the arbitrary response time of processors due to the
lack of a global clock. To tackle this problem, there are various approaches introduced. For
instance, Itai and Rodeh extended their algorithm by adding a message buffer and wake up
messages to trigger the computation in processes.
Uniform algorithm:
In typical approaches to leader election, the size of the ring is assumed to be known to the
processes. In the case of anonymous rings, without using an external entity, it is not possible to
elect a leader. Even assuming an algorithm exist, the leader could not estimate the size of the
ring. i.e. in any anonymous ring, there is a positive probability that an algorithm computes a
wrong ring size. To overcome this problem, Fisher and Jiang used a so-called leader oracle ? that
each processor can ask whether there is a unique leader. They show that from some point
upward, it is guaranteed to return the same answer to all processes.
Rings with unique IDs:
In one of the early works, Chang and Roberts proposed a uniform algorithm in which a processor
with the highest ID is selected as the leader. Each processor sends its ID in a clockwise direction.
A process receiving a message and compares it with its own. If it is bigger, it passes it through,
otherwise it will discard the message. They show that this algorithm uses O(n^2) messages and
O(nlogn) in the average case.
Hirschberg and Sinclair improved this algorithm with O(nlogn) message complexity by
introducing a 2 directional message passing scheme allowing the processors to send messages in
both directions.
Leader Election in Mesh:
The mesh is another popular form of network topology specially in parallel systems, redundant
memory systems and interconnection networks.
In a mesh structure, nodes are either corner (only two neighbours), border (only three
neighbours) or interior (with four neighbours). The number of edges in a mesh of size a x b is
m=2ab-a-b.
Unoriented mesh:
A typical algorithm to solve the leader election in an unoriented mesh is to only elect one of the
four corner nodes as the leader. Since the corner nodes might not be aware of the state of other
processes, the algorithm should first wake up the corner nodes. A leader can be elected as
follows.
Wake-up process: in which k nodes initiate the election process. Each initiator sends a wake-up
message to all its neighbouring nodes. If a node is not initiator, it simply forwards the messages
to the other nodes. In this stage at most 3n+k messages are sent.
Election process: the election in outer ring takes two stages at most with 6(a+b)-16 messages.
Termination: leader sends a terminating message to all nodes. This requires at most 2n messages.
The message complexity is at most 6(a+b)-16 and if the mesh is square shaped O(n).
Oriented Mesh:
An oriented mesh is a special case where are port numbers are compass labels, i.e. north, south,
east and west. Leader election in an oriented mesh is trivial. We only need to nominate a corner,
e.g. “north” and “east” and make sure that node knows it is a leader.
Torus:
Torus network structure.
A special case of mesh architecture is a torus which is a mesh with “wrap-around”. In this
structure, every node has exactly 4 connecting edges. One approach to elect a leader in such a
structure is known as electoral stages. Similar to procedures in ring structures, this method in
each stage eliminates potential candidates until eventually one candidate node is left. This node
becomes the leader and then notifies all other processes of termination. This approach can be
used to achieve a complexity of O(n). There also more practical approaches introduced for
dealing with presence of faulty links in the network.
Election in Hypercubes:H_4 hypercube network topology.
A Hypercube H_k is a network consisting of n=2^k nodes, each with degree of k and O(n log n)
edges. A similar electoral stages as before can be used to solve the problem of leader election. In
each stage two nodes (called duelists) compete and the winner is promoted to the next stage. This
means in each stage only half of the duelists enter the next stage. This procedure continues until
only one duelist is left, and it becomes the leader. Once selected, it notifies all other processes.
This algorithm requires O(n) messages. In the case of unoriented hypercubes, a similar approach
can be used but with a higher message complexity of O(nloglogn).
Election in complete networks:
Complete network structure.
Complete networks are structures in which all processes are connected to one another, i.e., the
degree of each node is n-1, n being the size of the network. An optimal solution with O(n)
message and space complexity is known. In this algorithm, processes have the following states:
Dummy: nodes that do not participate in the leader election algorithm.
Passive: the initial state of processes before start.
Candidate: the status of nodes after waking up. The candidate nodes will be considered to
become the leader.
To elect a leader, a virtual ring is considered in the network. All processors initially start in a
passive state until they are woken up. Once the nodes are awake, they are candidates to become
the leader. Based on a priority scheme, candidate nodes collaborate in the virtual ring. At some
point, candidates become aware of the identity of candidates that precede them in the ring. The
higher priority candidates ask the lower ones about their predecessors. The candidates with lower
priority become dummies after replying to the candidates with higher priority. Based on this
scheme, the highest priority candidate eventually knows that all nodes in the system are dummies
except itself, at which point it knows it is the leader.

More Related Content

Similar to The leader algorithm (Horrigan [394]) represents each cluster using a.pdf

Leader election approach a comparison and survey
Leader election approach a comparison and surveyLeader election approach a comparison and survey
Leader election approach a comparison and surveyEditor Jacotech
 
Leader Election Approach: A Comparison and Survey
Leader Election Approach: A Comparison and SurveyLeader Election Approach: A Comparison and Survey
Leader Election Approach: A Comparison and SurveyEditor Jacotech
 
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Florent Renucci
 
Distributed Coordination
Distributed CoordinationDistributed Coordination
Distributed CoordinationLuis Galárraga
 
Adaptive Geographical Search in Networks
Adaptive Geographical Search in NetworksAdaptive Geographical Search in Networks
Adaptive Geographical Search in NetworksAndrea Wiggins
 
Election in Wireless Environment
Election in Wireless EnvironmentElection in Wireless Environment
Election in Wireless EnvironmentLahiru Danushka
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEAravind NC
 
Network layer new
Network layer newNetwork layer new
Network layer newreshmadayma
 
Web spam classification using supervised artificial neural network algorithms
Web spam classification using supervised artificial neural network algorithmsWeb spam classification using supervised artificial neural network algorithms
Web spam classification using supervised artificial neural network algorithmsaciijournal
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
Extended pso algorithm for improvement problems k means clustering algorithm
Extended pso algorithm for improvement problems k means clustering algorithmExtended pso algorithm for improvement problems k means clustering algorithm
Extended pso algorithm for improvement problems k means clustering algorithmIJMIT JOURNAL
 
Modified Bully Algorithm Incorporating the Concept of Election Commissio...
Modified  Bully  Algorithm  Incorporating  the  Concept of Election Commissio...Modified  Bully  Algorithm  Incorporating  the  Concept of Election Commissio...
Modified Bully Algorithm Incorporating the Concept of Election Commissio...Conference-Proceedings-CrimsonPublishers
 
Web Spam Classification Using Supervised Artificial Neural Network Algorithms
Web Spam Classification Using Supervised Artificial Neural Network AlgorithmsWeb Spam Classification Using Supervised Artificial Neural Network Algorithms
Web Spam Classification Using Supervised Artificial Neural Network Algorithmsaciijournal
 
network mining and representation learning
network mining and representation learningnetwork mining and representation learning
network mining and representation learningsun peiyuan
 
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final DraftMathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final DraftAlexanderCominsky
 

Similar to The leader algorithm (Horrigan [394]) represents each cluster using a.pdf (20)

Leader election approach a comparison and survey
Leader election approach a comparison and surveyLeader election approach a comparison and survey
Leader election approach a comparison and survey
 
Leader Election Approach: A Comparison and Survey
Leader Election Approach: A Comparison and SurveyLeader Election Approach: A Comparison and Survey
Leader Election Approach: A Comparison and Survey
 
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
Manifold Blurring Mean Shift algorithms for manifold denoising, report, 2012
 
Distributed Coordination
Distributed CoordinationDistributed Coordination
Distributed Coordination
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Adaptive Geographical Search in Networks
Adaptive Geographical Search in NetworksAdaptive Geographical Search in Networks
Adaptive Geographical Search in Networks
 
Election in Wireless Environment
Election in Wireless EnvironmentElection in Wireless Environment
Election in Wireless Environment
 
Space time & power.
Space time & power.Space time & power.
Space time & power.
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
 
Network layer new
Network layer newNetwork layer new
Network layer new
 
Web spam classification using supervised artificial neural network algorithms
Web spam classification using supervised artificial neural network algorithmsWeb spam classification using supervised artificial neural network algorithms
Web spam classification using supervised artificial neural network algorithms
 
Network layer (Unit 3) part1.pdf
Network  layer (Unit 3) part1.pdfNetwork  layer (Unit 3) part1.pdf
Network layer (Unit 3) part1.pdf
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Extended pso algorithm for improvement problems k means clustering algorithm
Extended pso algorithm for improvement problems k means clustering algorithmExtended pso algorithm for improvement problems k means clustering algorithm
Extended pso algorithm for improvement problems k means clustering algorithm
 
Modified Bully Algorithm Incorporating the Concept of Election Commissio...
Modified  Bully  Algorithm  Incorporating  the  Concept of Election Commissio...Modified  Bully  Algorithm  Incorporating  the  Concept of Election Commissio...
Modified Bully Algorithm Incorporating the Concept of Election Commissio...
 
Web Spam Classification Using Supervised Artificial Neural Network Algorithms
Web Spam Classification Using Supervised Artificial Neural Network AlgorithmsWeb Spam Classification Using Supervised Artificial Neural Network Algorithms
Web Spam Classification Using Supervised Artificial Neural Network Algorithms
 
network mining and representation learning
network mining and representation learningnetwork mining and representation learning
network mining and representation learning
 
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final DraftMathematics Research Paper - Mathematics of Computer Networking - Final Draft
Mathematics Research Paper - Mathematics of Computer Networking - Final Draft
 

More from mallik3000

Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfExplain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfmallik3000
 
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfExercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfmallik3000
 
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfestion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfmallik3000
 
Discuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfDiscuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfmallik3000
 
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfDiels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfmallik3000
 
Create a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfCreate a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfmallik3000
 
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfCompare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfmallik3000
 
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfChoose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfmallik3000
 
Change the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfChange the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfmallik3000
 
Canon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfCanon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfmallik3000
 
Can someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfCan someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfmallik3000
 
Write a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfWrite a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfmallik3000
 
What happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfWhat happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfmallik3000
 
Write a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfWrite a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfmallik3000
 
Using the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfUsing the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfmallik3000
 
Why are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfWhy are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfmallik3000
 
What is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfWhat is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfmallik3000
 
What is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfWhat is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfmallik3000
 
What methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfWhat methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfmallik3000
 
What is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfWhat is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfmallik3000
 

More from mallik3000 (20)

Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfExplain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
 
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfExercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
 
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfestion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
 
Discuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfDiscuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdf
 
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfDiels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
 
Create a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfCreate a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdf
 
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfCompare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
 
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfChoose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
 
Change the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfChange the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdf
 
Canon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfCanon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdf
 
Can someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfCan someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdf
 
Write a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfWrite a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdf
 
What happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfWhat happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdf
 
Write a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfWrite a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdf
 
Using the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfUsing the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdf
 
Why are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfWhy are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdf
 
What is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfWhat is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdf
 
What is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfWhat is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdf
 
What methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfWhat methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdf
 
What is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfWhat is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdf
 

Recently uploaded

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 

Recently uploaded (20)

Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 

The leader algorithm (Horrigan [394]) represents each cluster using a.pdf

  • 1. The leader algorithm (Horrigan [394]) represents each cluster using a point, known as a leader, and assigns each point to the cluster corresponding to the closest leader, unless this distance is above a user-specified threshold. In that case, the point becomes the leader of a new cluster. What are the advantages and disadvantages of the leader algorithm as compared to K-means? Suggest ways in which the leader algorithm might be improved. Solution (a)K-Means Clustering Advantages and Disadvantages K-Means Advantages: 1) If variables are enormous, then K-Means the majority of the times computationally faster than hierarchical clustering, if we stay k smalls. 2) K-Means create tighter clusters than hierarchical clustering, particularly if the clusters are globular. K-Means Disadvantages: 1) Hard to predict K-Value. 2) With global cluster, it didn't work fine. 3) Dissimilar initial partitions can result in dissimilar final clusters. 4) It does not work fine with clusters of dissimilar size and dissimilar density. (b)Definition: The difficulty of leader election is for each processor finally to decide that whether it is a leader or not subject to merely one processor decides that it is the leader. An algorithm resolves the leader election difficulty if: States of processors are alienated into elected and not elected states. Once chosen, it remains as elected. In every implementation, precisely one processor becomes elected and the rest decide that they are not elected. A suitable leader election algorithm must convene the following conditions: Termination: the algorithm should finish eventually within a finite time one leader is selected. In randomized approaches this condition is sometimes weakened Uniqueness: there is exactly one processor that considers itself as leader. Agreement: all other processors know who the leader is. An algorithm for leader election may vary in following aspects: Communication mechanism: the processors are either synchronous in which processes are synchronized by a clock signal or asynchronous where processes run at arbitrary speeds. Process names: whether processes have a unique identity or are indistinguishable.
  • 2. Network topology: for instance, ring, acyclic graph or complete graph. Size of the network: the algorithm may or may not use knowledge of the number of processes in the system. Algorithms: Leader election in rings: Ring network topology A ring network is a connected-graph topology in which each node is exactly connected to two other nodes, i.e., for a graph with n nodes, there are exactly n edges connecting the nodes. A ring can be unidirectional, which means processors only communicate in one direction, or bidirectional, meaning processors may transmit and receive messages in both directions. Anonymous rings: A ring is said to be anonymous if every processor is identical. More formally, the system has the same state machine for every processor. There is no deterministic algorithm to elect a leader in anonymous rings, even when the size of the network is known to the processes. This is due to the fact that there is no possibility of breaking symmetry in an anonymous ring if all processes run at the same speed. The state of processors after some steps only depends on the initial state of neighbouring nodes. So, because their states are identical and execute the same procedures, in every round the same messages are sent by each processor. Therefore, each processor state also changes identically and as a result if one processor is elected as a leader, so are all the others. Randomized (probabilistic) leader election: A common approach to solve the problem of leader election in anonymous rings is the use of probabilistic algorithms. In such approaches, generally processors assume some identities based on a probabilistic function and communicate it to the rest of the network. At the end, through the application of an algorithm, a leader is selected (with high probability). Synchronous ring: Itai and Rodeh introduced an algorithm for a unidirectional ring with synchronized processes. They assume the size of the ring (number of nodes) is known to the processes. For a ring of size n, an processors are active. Each processor decides with probability of a^(-1) whether to become a candidate. At the end of each phase, each processor calculates the number of candidates c and if it is equal to 1, it becomes the leader. To determine the value of c, each candidate sends a token (pebble) at the start of the phase which is passed around the ring, returning after exactly n time units to its sender. Every processor determines c by counting the number of pebbles which passed through. This algorithm achieves leader election with expected message complexity of O(nlogn). A similar approach is also used in in which a time-out mechanism is employed to detect deadlocks in the system. There are also algorithms for rings of special sizes such as prime size and odd size.
  • 3. Asynchronous ring: In the case of asynchronous systems, the problem of leader election becomes more difficult. This is because of the uncertainty introduced by the arbitrary response time of processors due to the lack of a global clock. To tackle this problem, there are various approaches introduced. For instance, Itai and Rodeh extended their algorithm by adding a message buffer and wake up messages to trigger the computation in processes. Uniform algorithm: In typical approaches to leader election, the size of the ring is assumed to be known to the processes. In the case of anonymous rings, without using an external entity, it is not possible to elect a leader. Even assuming an algorithm exist, the leader could not estimate the size of the ring. i.e. in any anonymous ring, there is a positive probability that an algorithm computes a wrong ring size. To overcome this problem, Fisher and Jiang used a so-called leader oracle ? that each processor can ask whether there is a unique leader. They show that from some point upward, it is guaranteed to return the same answer to all processes. Rings with unique IDs: In one of the early works, Chang and Roberts proposed a uniform algorithm in which a processor with the highest ID is selected as the leader. Each processor sends its ID in a clockwise direction. A process receiving a message and compares it with its own. If it is bigger, it passes it through, otherwise it will discard the message. They show that this algorithm uses O(n^2) messages and O(nlogn) in the average case. Hirschberg and Sinclair improved this algorithm with O(nlogn) message complexity by introducing a 2 directional message passing scheme allowing the processors to send messages in both directions. Leader Election in Mesh: The mesh is another popular form of network topology specially in parallel systems, redundant memory systems and interconnection networks. In a mesh structure, nodes are either corner (only two neighbours), border (only three neighbours) or interior (with four neighbours). The number of edges in a mesh of size a x b is m=2ab-a-b. Unoriented mesh: A typical algorithm to solve the leader election in an unoriented mesh is to only elect one of the four corner nodes as the leader. Since the corner nodes might not be aware of the state of other processes, the algorithm should first wake up the corner nodes. A leader can be elected as follows. Wake-up process: in which k nodes initiate the election process. Each initiator sends a wake-up message to all its neighbouring nodes. If a node is not initiator, it simply forwards the messages
  • 4. to the other nodes. In this stage at most 3n+k messages are sent. Election process: the election in outer ring takes two stages at most with 6(a+b)-16 messages. Termination: leader sends a terminating message to all nodes. This requires at most 2n messages. The message complexity is at most 6(a+b)-16 and if the mesh is square shaped O(n). Oriented Mesh: An oriented mesh is a special case where are port numbers are compass labels, i.e. north, south, east and west. Leader election in an oriented mesh is trivial. We only need to nominate a corner, e.g. “north” and “east” and make sure that node knows it is a leader. Torus: Torus network structure. A special case of mesh architecture is a torus which is a mesh with “wrap-around”. In this structure, every node has exactly 4 connecting edges. One approach to elect a leader in such a structure is known as electoral stages. Similar to procedures in ring structures, this method in each stage eliminates potential candidates until eventually one candidate node is left. This node becomes the leader and then notifies all other processes of termination. This approach can be used to achieve a complexity of O(n). There also more practical approaches introduced for dealing with presence of faulty links in the network. Election in Hypercubes:H_4 hypercube network topology. A Hypercube H_k is a network consisting of n=2^k nodes, each with degree of k and O(n log n) edges. A similar electoral stages as before can be used to solve the problem of leader election. In each stage two nodes (called duelists) compete and the winner is promoted to the next stage. This means in each stage only half of the duelists enter the next stage. This procedure continues until only one duelist is left, and it becomes the leader. Once selected, it notifies all other processes. This algorithm requires O(n) messages. In the case of unoriented hypercubes, a similar approach can be used but with a higher message complexity of O(nloglogn). Election in complete networks: Complete network structure. Complete networks are structures in which all processes are connected to one another, i.e., the degree of each node is n-1, n being the size of the network. An optimal solution with O(n) message and space complexity is known. In this algorithm, processes have the following states: Dummy: nodes that do not participate in the leader election algorithm. Passive: the initial state of processes before start. Candidate: the status of nodes after waking up. The candidate nodes will be considered to become the leader. To elect a leader, a virtual ring is considered in the network. All processors initially start in a passive state until they are woken up. Once the nodes are awake, they are candidates to become
  • 5. the leader. Based on a priority scheme, candidate nodes collaborate in the virtual ring. At some point, candidates become aware of the identity of candidates that precede them in the ring. The higher priority candidates ask the lower ones about their predecessors. The candidates with lower priority become dummies after replying to the candidates with higher priority. Based on this scheme, the highest priority candidate eventually knows that all nodes in the system are dummies except itself, at which point it knows it is the leader.