MuMHR:Multi-path, multi-hop hierarchical routing_2007
哈夫曼编码 信息学奥赛

哈夫曼编码信息学奥赛
哈夫曼编码是一种可变长度编码方式,它根据字符出现概率来构造平均长度最短的码字。
哈夫曼编码是哈夫曼树的一种应用,哈夫曼树是一种特殊的二叉树,它的所有叶子节点都带有权值,从中构造出带权路径长度最短的二叉树。
在信息学奥赛中,哈夫曼编码通常用于数据压缩和编码问题。
例如,给定一组字符及其出现频率,要求设计一种编码方式使得字符的平均编码长度最短。
这种问题可以使用哈夫曼树来解决,具体步骤如下:
1. 根据字符出现频率构建哈夫曼树。
2. 对哈夫曼树进行编码,从根节点开始,对左子树分配码“0”,右子树分
配码“1”,一直到达叶子节点为止。
3. 将从树根沿每条路径到达叶子节点的代码排列起来,便得到了哈夫曼编码。
哈夫曼编码在信息学奥赛中非常重要,因为它是一种高效的数据压缩和编码方式,能够有效地减少存储空间和提高数据传输效率。
mulliken集居数的基本关系

mulliken集居数的基本关系马利肯原子结构方法是非常有用的以解释分子构型以及电子结构的有效方法。
它与傅里叶分解(Fourier decomposition)相结合,是20世纪中叶出现的重要方法之一。
马利肯原子结构方法的原理在古典与量子物理学之间,即用古典性质来描述量子物理。
该方法对解释各种氧化物分子以及其他复杂分子,均有十分重要的价值。
由此,不仅仅是理论化学家和结构物理学家十分重视,而且也被实验化学家、分子生物学家和材料科学家用于量化分析实验结果,以及解释实验结果。
马利肯集居数是马利肯原子结构方法中的一个重要结果。
它表示了相对分子轨道(MO)的具体分子结构,即电子结构的程度,它的物理含义是每个原子的电子构造结果。
即马利肯集居数实际上表达的是某一原子的电子结构结果,可以应用于科学研究以及实际工程中,用于解释双极类分子的反应模型、半导体材料的设计等等,同时也是瑞典科学家马利肯提出”电子亲和力”(electronegativity)这一概念的起点。
从马利肯角度来讲,集居数实质上表示某个原子有多少电子被其余原子所锁定,它不仅可以用于给出某原子或分子在电子结构上定置情况,而且还可以用于描述原子偶极矩以及两种分子间的相对电子配对情况。
集居数可以用来解释分子结构规律,特别是当其余原子的电荷分布的分布状态不平衡时,就可以用它来分析分子的结构情况以及体系的力学稳定性。
此外,集居数具有量化模型,因此当原子上存在电子附着时,就可以用马利肯集居数作出量化计算。
在此之上,集居数迅速有效计算出电子张量的积分,可以用该模型再现分子的电子构造,马利肯的集居数原理甚至定义了一般原子的元素化学性质,得到了一个较直观的总结,可以帮助人们了解某一原子在某一分子的电子分配情况。
总的来说,马利肯集居数可以广泛地应用于化学和材料学的科学研究,不仅可以解释分子构造以及分子间的相互作用,而且还可以用于定量分析,能够更有效地探究化学反应机制,而不是变化当中的实质。
如何利用马尔可夫逻辑进行多模态数据融合(Ⅲ)

马尔可夫逻辑是一种基于概率的数学模型,用于描述一个系统在一定条件下从一个状态转移到另一个状态的过程。
它可以被应用于多模态数据融合,即将来自不同传感器或数据源的信息整合在一起,以获得更全面和准确的信息。
多模态数据融合在现代科学和工程领域中扮演着至关重要的角色。
例如,在智能交通系统中,我们需要整合来自交通摄像头、交通传感器和交通流量数据等多种数据,以实现准确的交通监控和预测。
在医学影像诊断中,结合来自X光、CT 扫描和MRI等多种不同的影像数据,可以提高疾病诊断的准确性。
因此,如何有效地利用马尔可夫逻辑进行多模态数据融合成为了一个重要课题。
首先,我们需要了解马尔可夫逻辑的基本原理。
马尔可夫逻辑是基于马尔可夫链的模型,马尔可夫链是一个描述随机过程的数学工具,其基本思想是当前状态只与前一个状态有关,与更早的状态无关。
在多模态数据融合中,我们可以将不同传感器或数据源的信息看作不同的状态,而它们之间的转移概率则可以描述为各种数据之间的相关性。
通过建立马尔可夫逻辑模型,我们可以利用这些转移概率来推断不同数据之间的关联关系,从而实现数据融合。
其次,马尔可夫逻辑可以用于处理不完整或噪声数据。
在实际应用中,不同传感器或数据源采集到的信息可能存在缺失或者噪声,这会导致数据融合的困难。
马尔可夫逻辑具有较强的容错性,它可以通过对缺失数据的推断和对噪声数据的抑制,从而在一定程度上提高了数据的完整性和准确性。
通过建立合适的观测模型和转移模型,我们可以利用马尔可夫逻辑来对不完整或噪声数据进行有效的补全和过滤,从而实现多模态数据的融合。
此外,马尔可夫逻辑还可以用于动态系统的建模和预测。
在多模态数据融合中,我们不仅需要对数据进行静态的整合,还需要对数据进行动态的建模和预测。
马尔可夫逻辑具有良好的动态建模能力,它可以通过对当前状态的观测和转移概率的推断,来预测系统未来的状态。
这对于实现对多模态数据融合结果的实时监控和预测具有重要意义。
如何利用马尔可夫逻辑进行多模态数据融合的特征交叉(十)

在当今信息爆炸的时代,多模态数据融合成为了一项重要的研究课题。
多模态数据融合是指从多个不同模态的数据源中获取信息,并将这些信息整合到一个统一的框架中进行分析和处理。
马尔可夫逻辑是一种用于建模复杂系统和数据的强大工具,其在多模态数据融合中也有着广泛的应用。
本文将探讨如何利用马尔可夫逻辑进行多模态数据融合的特征交叉。
## 马尔可夫逻辑简介马尔可夫逻辑是一种用于建模不确定性的逻辑框架,其核心思想是基于马尔可夫决策过程(MDP)和马尔可夫随机场(MRF)。
在多模态数据融合中,马尔可夫逻辑可以用于将来自不同模态的数据进行联合建模,并对其进行概率推断。
通过马尔可夫逻辑,可以实现模态之间的信息共享和交互,从而更好地利用多模态数据的丰富信息。
## 多模态数据融合的挑战在多模态数据融合中,最大的挑战之一是如何有效地进行特征交叉。
不同模态的数据往往具有不同的特征表示,如何将这些特征进行有效的交叉,以获取更丰富和准确的信息,是多模态数据融合面临的重要问题。
传统的特征交叉方法往往只能处理单一模态的数据,对于多模态数据的特征交叉仍然具有一定的局限性。
## 马尔可夫逻辑在多模态数据融合中的应用利用马尔可夫逻辑进行多模态数据融合的特征交叉,可以充分利用不同模态数据之间的关联和交互信息,从而实现更好的特征融合效果。
首先,可以利用马尔可夫逻辑对不同模态的数据进行联合建模,构建一个统一的概率图模型。
在这个模型中,不同模态的数据可以相互影响和补充,从而实现了模态之间的信息共享和交互。
其次,通过马尔可夫逻辑的推断和学习方法,可以有效地实现多模态数据的特征交叉。
马尔可夫逻辑可以通过学习模型参数和推断隐藏变量的方法,自动发现不同模态数据之间的潜在关联和相互作用,从而实现了特征的有效交叉和整合。
## 深度学习与马尔可夫逻辑的结合近年来,深度学习作为一种强大的模式识别和特征学习方法,也被广泛应用于多模态数据融合中。
深度学习可以通过神经网络模型来学习和提取不同模态数据的特征表示,从而实现了对多模态数据的高效整合和处理。
多频段多系统MR合并,预测频率重耕后5G多频组网覆盖效果

I G I T C W技术 分析Technology Analysis54DIGITCW2024.020 引言移动通信网络普遍使用MR 测量进行网络覆盖评估,传统的MR 覆盖评估方法一般仅使用同频MR 数据,对单系统网络评估结果较为准确,但对于多频段多系统组网的网络,受不同频段及异系统互操作驻留策略影响,存在“幸存者偏差”问题,只能评估用户在当前网络上的覆盖水平,较高的驻留门限会导致覆盖评估结果不准确,不能呈现真实的网络覆盖情况。
此外,传统的方法只能评估已建成的网络,不能预测频率重耕后5G 多频组网下的覆盖情况,不能精准指导网络规划及建设。
针对传统MR 评估方法存在的问题,根据MR 测量原理,本文提出了一种基于多频段多系统的MR 测量(同频、异频、异系统)数据进行网络覆盖评估的方法,通过合并异频、异系统MR 测量数据,弥补驻留策略导致的MR 覆盖评估数据缺失的不足,可以对单一频率覆盖进行还原,有效避免了目前同频MR 覆盖评估存在的“幸存者偏差”问题,提高了网络覆盖评估准确性,并可以提前对频率重耕后的5G 多频组网覆盖效果进行预测,提供数据支撑网络规划与建设。
通过在中国联通L900M +L1800M 网络及5G 网络中按本方法进行评估并进行实测验证,实测结果基本与MR 评估结果一致,证明了本方法的准确性。
1 整体方案概述(1)通过采集L900M 同频MR 数据、L1800M 异频MR 测量L900M 数据,进行数据处理和栅格数据合作者简介:田 超(1978-),男,安徽马鞍山人,中级工程师,学士,主要从事无线网规划和建设工作。
戴 廷(1983-),男,江苏徐州市人,中级工程师,学士,主要从事无线网运营管理工作。
多频段多系统MR合并,预测频率重耕后5G多频组网覆盖效果田 超,戴 廷(中国联合网络通信有限公司安徽省分公司,安徽 合肥 230071)摘要:传统MR覆盖评估方法只能评估现网单系统网络的覆盖效果,无法评估频率重耕后的多频段网络覆盖效果,而且存在“幸存者偏差”问题,导致评估数据不完整。
python蒙卡遗传算法

python蒙卡遗传算法Python蒙特卡洛遗传算法介绍蒙特卡洛遗传算法(Monte Carlo Genetic Algorithm)是一种基于概率和随机性的优化算法。
它结合了蒙特卡洛模拟和遗传算法的思想,用于解决复杂的优化问题。
Python作为一种强大的编程语言,提供了丰富的库和工具,使得实现蒙特卡洛遗传算法变得简单且高效。
基本原理蒙特卡洛遗传算法通过模拟随机事件来估计问题的最优解。
它使用遗传算法中的进化过程来搜索解空间,并使用蒙特卡洛模拟来评估每个个体的适应度。
1. 初始化种群:随机生成初始种群,其中每个个体代表一个可能的解。
2. 评估适应度:对每个个体进行适应度评估,即计算其在问题空间中的目标函数值。
3. 选择操作:根据适应度值选择父代个体进行交叉和变异操作。
4. 交叉操作:对选定的父代个体进行交叉操作,生成子代个体。
5. 变异操作:对子代个体进行变异操作,引入新的基因组合。
6. 更新种群:将子代个体与父代个体合并,形成新的种群。
7. 重复步骤2-6,直到满足停止条件(达到最大迭代次数或找到满意的解)。
Python实现下面是一个简单的Python代码示例,演示了如何使用蒙特卡洛遗传算法解决一个简单的优化问题。
```pythonimport random# 目标函数:计算x^2 + y^2 的最小值def objective_function(x, y):return x**2 + y**2# 初始化种群def initialize_population(population_size):population = []for _ in range(population_size):x = random.uniform(-10, 10)y = random.uniform(-10, 10)population.append((x, y))return population# 计算适应度值def calculate_fitness(population):fitness_values = []for individual in population:x, y = individualfitness_values.append(objective_function(x, y))return fitness_values# 选择操作:轮盘赌选择def selection(population, fitness_values):total_fitness = sum(fitness_values)probabilities = [fitness / total_fitness for fitness infitness_values]selected_population = []for _ in range(len(population)):selected_individual = random.choices(population, probabilities)[0]selected_population.append(selected_individual)return selected_population# 交叉操作:单点交叉def crossover(parent1, parent2):crossover_point = random.randint(1, len(parent1) - 1)child1 = parent1[:crossover_point] + parent2[crossover_point:] child2 = parent2[:crossover_point] + parent1[crossover_point:] return child1, child2# 变异操作:随机变异def mutation(individual, mutation_rate):mutated_individual = []for gene in individual:if random.random() < mutation_rate:mutated_gene = random.uniform(-10, 10)mutated_individual.append(mutated_gene)else:mutated_individual.append(gene)return tuple(mutated_individual)# 更新种群def update_population(selected_population, population_size, mutation_rate):new_population = []while len(new_population) < population_size:parent1, parent2 = random.sample(selected_population, 2) child1, child2 = crossover(parent1, parent2)mutated_child1 = mutation(child1, mutation_rate)mutated_child2 = mutation(child2, mutation_rate)new_population.extend([mutated_child1, mutated_child2]) return new_population[:population_size]# 主函数def main():population_size = 100max_iterations = 1000mutation_rate = 0.01population = initialize_population(population_size)for iteration in range(max_iterations):fitness_values = calculate_fitness(population)selected_population = selection(population, fitness_values) population = update_population(selected_population, population_size, mutation_rate)best_solution = min(population, key=lambda individual: objective_function(*individual))print("Best solution:", best_solution)```总结蒙特卡洛遗传算法是一种强大的优化算法,通过结合蒙特卡洛模拟和遗传算法的思想,可以解决各种复杂的优化问题。
python 多目标遗传算法 约束条件

python 多目标遗传算法约束条件多目标遗传算法(MOGA)是一种优化算法,可以用于解决多目标优化问题。
在传统的优化算法中,通常只考虑一个目标函数,而在现实生活中,很多问题往往涉及到多个相互关联的目标。
MOGA通过综合考虑多个目标函数,寻找一组最优解,这些解被称为“非支配解”或“帕累托最优解”。
在MOGA中,每个解都表示为一个个体,而这些个体会根据其在目标空间中的表现进行进化。
遗传算法的基本思想是通过模拟自然界的进化过程,利用选择、交叉和变异等操作,逐步改进个体的适应度。
对于MOGA而言,需要设计适应度函数来评估每个个体在多个目标函数上的表现。
在设计适应度函数时,需要考虑多个目标函数之间的权重关系。
通常,我们可以通过设定不同的权重值来平衡不同目标之间的重要性。
例如,如果一个问题涉及到最小化成本和最大化利润两个目标,我们可以设定一个权重值来调整两个目标的相对重要性。
MOGA的核心思想是通过不断进化,逐步逼近帕累托最优解集。
帕累托最优解集是指在目标空间中不可被其他解支配的解的集合。
通过遗传算法的操作,MOGA可以在解空间中搜索到一组帕累托最优解,这些解在多个目标函数上都表现优秀。
为了增加算法的多样性和避免陷入局部最优解,MOGA还引入了一些改进措施。
例如,引入种群多样性维持机制,通过选择适当的交叉和变异操作,保持种群的多样性。
另外,也可以采用多目标选择算子,来选择不同适应度等级的个体,以增加种群的多样性。
在应用MOGA解决实际问题时,需要根据具体情况进行算法的参数设置。
例如,种群规模、交叉概率、变异概率等都需要根据问题的特点来确定。
另外,也可以采用一些高级的MOGA算法,如NSGA-II、SPEA2等,来进一步提高算法的性能。
总的来说,MOGA是一种强大的优化算法,可以有效解决多目标优化问题。
通过综合考虑多个目标,MOGA能够找到一组帕累托最优解,这些解在多个目标函数上都表现优秀。
在实际应用中,我们可以根据具体问题的特点,合理设计适应度函数和参数设置,以获得更好的优化结果。
字符合集和出现概率构造哈夫曼树

《字符合集和出现概率构造哈夫曼树》一、引言在信息技术领域,字符合集和出现概率构造哈夫曼树是一项重要且基础的概念。
本文将深入探讨字符合集和哈夫曼树的构造过程,并分析字符出现概率对哈夫曼树构造的影响,旨在让读者对此理解更加深入、全面。
二、字符合集和出现概率字符合集是指在某种编码方式下所能使用的字符的总体。
在计算机领域中,字符合集通常指的是能够表示文本、图像、声音等信息的全部字符。
而字符的出现概率则是指在一个文本或数据集中某个字符出现的频率,通常使用概率分布来表示。
在构造哈夫曼树的过程中,首先需要了解字符合集中各个字符的出现概率,因为出现概率越高的字符,在哈夫曼编码中对应的编码长度应该越短,以提高编码效率。
对字符合集中字符出现概率的准确评估对于哈夫曼树的构造至关重要。
三、哈夫曼树的构造步骤1. 根据字符出现概率构造叶子节点:首先根据给定的字符合集以及各字符的出现概率,构造对应的叶子节点。
出现概率较高的字符对应的叶子节点应该在哈夫曼树中拥有较短的路径长度。
2. 构造哈夫曼树的内部节点:在构造叶子节点之后,根据哈夫曼树的构造规则,通过不断合并概率最小的两个节点来构造内部节点,并更新概率信息。
这一过程直到所有节点合并成为一个根节点为止。
3. 确定字符的编码:通过遍历哈夫曼树的路径,确定每个字符对应的编码,从而完成哈夫曼编码的构造。
四、字符出现概率对哈夫曼树的影响字符出现概率对哈夫曼树的构造有着重要的影响。
在实际应用中,如果字符出现概率相差较大,那么对应的编码长度也会存在较大的差异。
合理评估字符出现概率,能够在一定程度上提高哈夫曼编码的效率。
当字符出现概率相近的时候,构造的哈夫曼树将会比较平衡,对应的编码长度也会较为接近,这样能够保证在编码和解码的过程中效率的平衡。
而当字符出现概率差异较大时,哈夫曼树将会不平衡,对应的编码长度也会存在较大的差异,这样就需要根据实际情况来平衡编码的效率和解码的效率。
五、我的观点和理解在我看来,字符合集和出现概率构造哈夫曼树是一项非常重要的基础概念。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
MuMHR:Mu lti-path,Multi-hop HierarchicalRoutingMohammad Hammoudeh∗,Alexander Kurz†,and Elena Gaura∗∗Cogent Computing Applied Research Centre,Department of Creative ComputingCoventry UniversityCoventry,CV15FB,UK.Email:aa2792@†Department of Computer ScienceUniversity of LeicesterLeicester,LE17RH,UK.Email:kurz@Abstract—This paper proposes a self-organizing,cluster based protocol-Mu lti-path,Multi-hop Hierarchical Routing(MuMHR) -for use in large scale,distributed Wireless Sensor Networks (WSN).With MuMHR,robustness is achieved by each node learning multiple paths and election of cluster-head backup node(s).Energy expenditure is reduced by shortening the distance between the node and its cluster-head and by reducing the setup communication overhead.This is done through incorporating the number-of-hops metric in addition to the back-off waiting time.Simulation results show that MuMHR performs better than LEACH,which is the most promising hierarchical routing algorithm to date;MuMHR reduces the total number of set-up messages by up to65%and enhances the data delivery ratio by up to0.83.I.I NTRODUCTIONHierarchical routing is one of the most popular routing schemes in sensor networks[1],[2],[3],[4],[5],[6],[7].It is a two or more tier routing scheme known for its scalability and communication efficiency.Nodes in the upper tier are called cluster-heads and act as a routing backbone,while nodes in the lower tier perform the sensing tasks.Kulkarni et al.[8]argue that multi-tier networks are scalable and offer a number of advantages over single-tier networks:lower cost, better coverage,higher functionality,and better reliability.A sink-based single tier network can lead to congestion at the gateway especially in dense sensor networks.This can cause communication delays and inadequate tracking of the sensed events.Moreover,some of the routing algorithms for such architecture are commonly not scalable.To overcome these problems,network clustering has been proposed as a possible solution.Low Energy Adaptive Clustering Hierarchy(LEACH)[9] is one of the most promising routing algorithms for sensor networks[1],[2],[3],[4],[5],[6],[7].However,LEACH has been based on a number of assumptions which in the authors’opinion limit its effectiveness in a number of applications.This paper proposes modifications to LEACH which will improve the robustness of the algorithm and reduce the energy con-sumption in the network.The dynamic clustering brings extra overhead,such as head changes,which may diminish savings in energy consumption.A possible solution which is examined in this paper in order to reduce set-up communication overhead is the use of the back-off time for advertisement messages. Also the assumption that every node can transmit to reach the sink is relaxed by enabling multi-hop transmissions.Finally, to add reliability to the protocol,nodes transmit over multiple paths transmissions and backup cluster-heads are elected. The rest of the paper is organized as follows.Section II briefly describes the network model and assumptions.Section III reviews the related work.Section IV describes the simula-tion tool used for the work in this paper.Section V exhibits the details of MuMHR.Section VI presents simulation results. Section VII concludes the paper.II.LEACHThe operation of LEACH is split into two phases,the set-up phase and the steady-state phase.To minimize overhead, the duration of the steady-state phase is longer than the set-up phase[9].During the set-up phase,the clusters are created and cluster-heads are elected.This election is made by every node choosing a random number between0and1.The sensor node becomes cluster-head if this random number is less than the threshold T(n)set as:T(n)=P/1−P×r mod1Pif n∈G0otherwise where P is the desired percentage of cluster-heads,r is the current round and G is the set of nodes that have not been selected as a cluster-head in the last1/P rounds.The desired percentage of cluster-heads was found to be5%of the total number of nodes in the network[9].Note that0cluster-heads and100%cluster-heads is equivalent to direct communication. After cluster-heads are chosen,they broadcast an advertise-ment message to the entire network declaring that they are the new cluster-heads.Every node receiving the advertisement decides to which cluster they wish to belong based on the signal strength of the received message.The sensor node sends a message to register with the cluster-head of their choice. Based on a Time Division Multiple Access(TDMA)approach, the cluster-head assigns each node registered in its clustera0-7695-2988-7/07 $25.00 © 2007 IEEE2007 International Conference on Sensor Technologies and Applications DOI 10.1109/SENSORCOMM.2007.11140time slot to send its data.This requires that every node must support TDMA.The cluster-head keeps a list of all nodes in the cluster to inform them of the TDMA schedule.During the steady-state phase,sensor nodes can start trans-mitting data to their respective cluster-head.The cluster-head applies aggregation functions to compress the data before transmission to the sink.After a predetermined period of time spent on the steady-state phase,the network enters the set-up phase again and starts a new round of creating clusters. LEACH is well-suited for applications where constant mon-itoring is needed and data collection occurs periodically to a centralized location[10].It increases network lifetime in two ways.First,the load is distributed to all nodes but not all at the same time.Second,there is lossless aggregation of data by the cluster-heads.The protocol is powerful and simple since nodes do not require global knowledge or location information to create clusters.LEACH is able to increase the network lifetime and it achieves a more than7-fold reduction in energy dissipation compared to direct communication[9].Despite the significant overall energy savings,however,the assumptions made by the protocol raise a number of issues: 1)LEACH assumes that all nodes begin with the sameamount of energy and that the amount of energy a cluster-head consumes is more than that of a non-cluster node.It also assumes that the amount of energy consumed by cluster-heads in every cluster round is constant.This assumption is however not realistic.Fur-thermore,making adjustments for differences in energy consumption causes LEACH to be less efficient.2)LEACH assumes that all nodes can communicate witheach other and are able to reach the sink.Therefore,it is only suitable for small size networks.3)LEACH requires that all nodes are continuously listen-ing.This is not realistic in a random distribution of the sensor nodes,for example,where cluster-heads would be located at the edge of the network.4)LEACH assumes that all nodes have data to send and soassign a time slot for a node even though some nodes might not have data to transmit.5)LEACH assumes that all nearby nodes have correlateddata which is not always true.6)Finally,there is no mechanism to ensure that the electedcluster-heads(P)will be uniformly distributed over the network.Hence,there is the possibility that all cluster-heads will be concentrated in one part of the network.III.R ELATED W ORKA number of enhancements over LEACH have been pro-posed previously[1],[2],[3],[4],[5],[6],[7].Lindsey and Raghavendra devised a protocol called Power Efficient GAthering in Sensor Information Systems(PEGASIS)[5]that is an improvement over LEACH.As opposed to LEACH, PEGASIS has no clusters,instead it creates chains from sensor nodes so that each node communicates only with their closest neighbours and only one node is selected from the chain to communicate with the sink.PEGASIS has a number of drawbacks[11]:•It requires dynamic adjustment of network topology to route data,which introduces significant overhead.•It requires location information.•Similar to LEACH,PEGASIS assumes that all nodes can communicate with the sink directly.•The head of the chain can become a bottleneck and cause excessive transmission delays.•It assumes that all nodes start with the same level of energy and consumption rates are equal.Hierarchical-PEGASIS[2]extends PEGASIS by introducing a hierarchy in the network topology.It aims to reduce trans-mission delays to the sink and proposes a data gathering scheme that balances the energy and delay cost.Although Hierarchical-PEGASIS avoids the clustering overhead,it still requires dynamic topological adjustments.Manjeshwar and Agrawal implemented the Threshold-sensitive Energy Efficient Protocol(TEEN),that utilizes a hierarchical approach along with a data centric mecha-nism[3].The same authors also developed the AdaPtive Threshold-sensitive Energy Efficient sensor Network protocol (APTEEN)[4],which enhances TEEN by capturing periodic data collection and reacting to time critical events.They demonstrated that APTEEN performance is between LEACH and TEEN in terms of energy dissipation and network lifetime. TEEN gives the best performance since it decreases the number of transmissions.Both TEEN and APTEEN proto-cols require additional traffic control to continually update the threshold values and complexity of forming clusters in multiple levels,implementing threshold-based functions and dealing with attribute-based naming of queries. Smaragdakis et al.[6]address the issue of heterogeneity(in terms of energy)of nodes.Their protocol,called SEP(Stable Election Protocol),is based on random selection of cluster-heads weighted according to the remaining node energy.This approach addresses the problem of varying energy levels and consumption rates but still assumes that the sink can be reached directly by all nodes.LEACH-C(LEACH Centralised)[1]uses a central algo-rithm to form clusters.This algorithm is not robust since it requires location information for all sensors in the network. LEACH and its derivatives have been successful in reducing the energy per bit required by each node and the network as a whole to communicate from the nodes to the sink. Nonetheless,most are built upon the inflexible assumptions that:every node is able to communicate directly with the sink; every communication path is equally likely to succeed;and, every node has the same starting energy level and uses energy at the same rate.This paper provides a protocol with the same underlying benefit as LEACH and derivatives but provides for multi-hop communication,and increases robustness by using multiple communication paths.Also,in comparison to LEACH and most derivatives,this protocol reduces the number of set-up messages required,and thus should extend network life.IV.S EN S OR P LUSIn order to implement the routing algorithm proposed in this paper and study its properties,a new version of an in-house sensor network simulator called SenSorPlus was used.SenSor [12]is a realistic and scalable Python based simulator that provides a workbench for prototyping algorithms for WSN.It consists of a fixed API,with customisable internals.Each simulated sensor node runs in its own thread and com-municates using the same protocols as its physical counterpart would be.This enables experimentation with different algo-rithms for managing the network topology,simulating fault management strategies and so on,within the same simulation.SenSorPlus is an extension of SenSor with an added interface between the simulation environment and different hardware platforms,for example the Gumstix [13]platform.SenSorPlus bridges between SenSor and the Gumstix to allow applications implemented within the simulator to be ported directly on to the hardware.Sensors are modelled using a pool of concurrent,communicating threads.Individual sensors are able to:1)Gather and process data from a model environment 2)Locate and communicate with their nearest neighbours 3)Determine whether they are operating correctly and act accordingly to alter the network topology in case of faulty nodes being detected.Separate interfaces gather information from the network and display it on the graph pane or the chart pane,where individual data can be plotted during the simulation.This partitioning allows us to experiment with different ways of processing individual node data into information.V.M U MHR:Mu LTI -PATH ,M ULTI -HOP H IERARCHICALR OUTING In this section,the properties of the proposed routing protocol,MuMHR are described.The main objective of this protocol is to provide substantially energy-efficient and robust communication.The energy efficiency is achieved by load balancing at two levels:(1)Network level,which involves traffic multiplexing over multiple paths;(2)Cluster level,introducing rotation of the cluster-heads every given interval oftime.This prevents energy depletion resulting from constantly using the same path for transmission or particular nodes being cluster-heads for a long duration.The multi-paths aspect is not only used for load balancing but also when path failures occur.When a path fails,an alternative path can be immediately used which allows the protocol to dynamically adapt to failures without delays or degradation in the quality of service.At the cluster set-up time,one or more nodes are chosen as cluster-head backup node(s).Backup cluster-head node substitute for the cluster-head in some failure cases or when the current cluster-head decides to reduce its participation in the protocol if its energy level approaches a certain threshold value.For instance,if the current cluster-head decides to hand its role to the backup node,it notifies the respective node and forwards to it necessary information,such as the backup nodes list,to avoid a complete cluster set-up phase.In this protocol,the duced.It indicates how far the cluster-head is from the sensing node.This allows nodes to:(1)Select the nearest cluster-head node,which saves energy and reduces messaging needed to bridge the distance between the cluster-head and the sensor node;(2)Allows a node to learn the shortest path to the selected cluster-head.We have also used a back-off waiting time similar to one proposed in [14]to decrease the number of set-up messages and aid the formation of more geographically uniform clusters.During the back-off waiting time,sensor nodes receive advertisement messages and only consider the message with the smallest number-of-hops received during that time.This allows blocking of the advertisement flooding at the edges of neighbouring clusters.Both the number-of-hops metric and the back-off waiting time allow energy efficient cluster formation.The operation of the proposed routing protocol can be split into two phases:the setup phase and the data transfer phase.A.Set-up PhaseDuring the set-up phase cluster-heads are selected and clusters are created.We assume that a simple addressing scheme is in place and the sink knows the range of addresses of nodes in the network.The sink randomly selects 5%of the nodes as cluster-heads and broadcasts this information.Every node that receives the discovery message changes its state from “waiting”to “discovered”and examines the message to check whether it has been selected as cluster-head or not.If yes,it starts a new cluster by broadcasting an advertisement message.Otherwise,it forwards the message to its neighbours.Every node will remember the node from which it has received the discovery message as the immediate neighbour nearest to the sink.This path will be used only in cluster failure situations.Every cluster-head will create an advertisement message that has the number-of-hops parameter set to zero and broadcasts it to its neighbours.Upon receiving an advertisement message,a sensor node will do the following:(a)If the node already belongs to a cluster,then it ignores the received advertisement message;(b)If the back-off waiting timer is still valid,then it caches the received packet and waits for other possible adver-tisements;(c)If the received message has a better number-of-hops metric than the stored one,the latter is deleted and the former is retained.When the back-off waiting time expires,the sensor node increases the number-of-hops parameter in the retained packet and broadcasts it to its neighbours.The node will remember the address of the sender,the cluster-head,and the node from which it received the message as the nearest neighbour to the cluster-head.If a sensor node receives multiple copies of the same advertisement,it selects the one(s)with minimum number-of-hops parameter.Then the node uses the available energy to calculate a value that represents its desire to be a cluster-head in the next cluster set-up round.This value is included in the registration packet that the node sends back to the chosen cluster-head.The cluster-head will extract the highest value(s)and adds its corresponding sender to the cluster-head backup list and registers the node as amember of the pacting different functions into a single multi-purpose message reduces set-up communication overhead and thus makes the protocol more stable and energy efficient.When the cluster round time is over,the current cluster-head hands the master role to the first node in the backup nodes list.With a single flood to cluster members only,the new cluster-head continues its predecessors’role without the need of further communications.The cluster-head role will also be handed to the backup node when a fault occurs in the current cluster-head node.However,in the study presented here,a limited set of faults were considered for the “hand-over”such as internal errors and the energy level approaches a threshold.In the case of faults,such as physical damage or fatal internal errors in the cluster-head,the nodes will use an alternative path until a backup node starts the process of creating a new cluster.B.Data Transmission PhaseDuring the data transmission phase,sensing nodes transmit data to their cluster-head.The cluster-heads aggregates the received data before transmission to the sink or immediately multiplex messages over multiple lines in time critical appli-cations.Each member node transmits data on its assigned time slot scheduled by TDMA.Furthermore,each cluster communicates using unique Carrier Sense Multiple Access (CDMA)codes to avoid interference with traffic generated by other clusters.VI.S IMULATION E XPERIMENTSUsing the SenSorPlus framework,we implemented the proposed algorithm.A demonstration of the simulation is available online 1.For our simulation,we gave all the nodes an initial supply of energy and ran the protocol until it converged.We consider the energy-efficiency of our routing protocol in terms of the number of set-up messages.For our experiments,we created a 100-node network,where the nodes are scattered randomly on 600×600grid,such that no two nodes share the same location.Figure 1shows a random node distribution topology of 100-nodes,where the arrows represent communicating neighbours.The power of the sensors radio transmitter is set to cover all nodes within a 20m radius.The processing delay for transmitting a message is randomly chosen between 5s and 10s .Using this network configuration,we ran the protocol and tracked its progress in terms of number of messages sent and delays.The simulation results are presented in the following subsections.A.Efficiency and RobustnessIn this subsection,we study how introducing the number-of-hops metric and the advertisements back-off waiting time can affect the energy efficient cluster formation.Figure 2shows four network topologies each resulting from a different simulation run.In each topology,nodes are organized into1/cds/distributing/who/sensor/hi-cluster-routing.htmlFigure 1.A 100-nodes WSN with randomtopology(a)(b)(c)(d)Figure 2.Geographically uniform cluster formationfive clusters (P=5).The lines indicate the borders of different clusters.In each experiment we studied how the back-off waiting time and the number-of-hops metric can help to form more geographically uniform clusters.Topologies (a)and (b)were generated using LEACH (the back-off waiting time and the number-of-hops were set to zero),whereas (c)and (d)were generated using MuMHR with the back-off waiting time set to 20s and the number-of-hops initially set to zero.Figure 3shows the node distribution among clusters in the four network topologies.The graphs compare the distribution of nodes among clusters formed using LEACH with those formed using MuMHR.In the LEACH topology (a),the first and fifth clusters hosted over 65%of the total number of nodes while the other three clusters hosted less than 35%of the total network population.In the second LEACH topology (b),the fifth cluster had zero nodes while the percentage of nodes fluctuated among theFigure3.Node distribution among clustersother clusters between7%and30%.It can be clearly seen that there is no unifirm distribution of node numbers amongst the clusters,which increases both the heavy clusters manage-ment overhead and also the energy comsumption.Whereas in MuMHR topologies(c)and(d),nodes were distributed much more fairly among clusters.The number of nodes at every cluster maintained a maximum of7%difference from the optimal population(20%).In topologies(a)and(b),the area covered by different clusters varies largely.These cluster topologies are not energy efficient because data needs to traverse large number of nodes to reach the cluster-head.In MuMHR generated topologies(c)and(d),the area of all clusters is almost equivalent and nodes are distributed much more fairly among thefive clusters than in(a)and(b)as figure2shows.This demonstrates that the back-off waiting time together with the number-of-hops metric lead to the formation of more energy efficient clusters by shortening the routes.The back-off waiting time gives more time to receive a smaller number-of-hops value.This allows nodes to register with the closest cluster-head resulting in more geographically uniform clusters.Furthermore,the number of advertisement messages is reduced,because nodes only forward the best advertisement received during the back-off waiting time.This stops unnecessaryflooding at the border of neighbouring clusters.Infigure4(a),the number of network setup messages versus the back-off waiting time is drawn.When the back-off waiting time is zero the total number of sent messages will be similar to that in LEACH.Thefigure shows that as the back-off waiting time becomes larger,the number of messages will decrease until the time becomes large enough to receive advertisements from all cluster-heads.It reduces the total number of set-up messages by up to65%over LEACH. Therefore,the back-off waiting time is effective in reducing overall set-up energy consumption.Figure4(b),shows the network convergence time versus the back-off waiting time.A linear correspondence between the time needed to establish routes and the back-off waiting time is evident.As the back-off waiting time increases,network convergence time will increase proportionally.In time critical applications it is important that the convergence time isFigure4.(a)The number of sent messages versus the back-off waiting time.(b)The convergence time versus the back-off waiting timereduced.This means,reducing the back-off waiting time to a minimal value to capture the advantages of the back-offwaiting time with minimal delay to achieve efficiency.B.Fault-Tolerance and ReliabilityMany of the proposed protocols in thefield of sensor networks show poor fault-tolerance in the face of frequentnode failures[15].MuMHR provides fault tolerance through a multi-path routing strategy.The multiple paths are learned by nodes during the set-up phase through redundant messages.For example,the path to the cluster-head node is learnt from the advertisement message sent by the cluster-head.Each node joins the cluster for a certain period of time T nC before it re-registers with the cluster again or registers with a new cluster. The cluster also has a life T C1;a cluster-head starts a newcluster formation round by handing the cluster-head role to the backup node.In this approach,the worst time T R to recover from a node failure is the time taken for a node to leave acluster or to renew registration with the same cluster-head it currently belongs to.This is written as:T R=T C1−T nC. If all paths that a sensor node has learned fail,the nodewill broadcast its data to its neighbours.Neighbours will then pass the message to their cluster-head.The cluster-head mayreceive multiple copies of the same message and eliminates redundancy by applying aggregation.To measure the fault-Figure5.DDR versus number of functioning nodes tolerance capabilities of this protocol we make some nodes function as faulty nodes by dropping all packets that they receive,and hence affecting the communication paths.These nodes will become faulty after paths are set-up and recover to function correctly in the next cluster formation round.In the simulation,10%of the nodes are forced to break down after paths are established.The fault tolerance capabilities of this routing protocol are evaluated using the Data Delivery Ratio (DDR)as a metric which measures the ability of the network to deliver packets to the sink through multi-paths.This measure is easy to obtain and free with every received packet.DDR is a service level parameter that indicates the network effec-tiveness in transmitting offered data in one direction of virtual connection[16].It represents the ratio of packets successfully received to packet transmission attempts.Attempted packets transmitted are referred to as DataOffered.Successfully deliv-ered packets are referred to as DataDelivered.Then the ratio can be written as:DDR=DataDelivered/DataOffered. Figure5shows the DDR versus the number of functioning nodes.With the same configuration described in Section VI, the DDR value for ten runs each with a different network-density were drawn.The results show that the protocol main-tained an average delivery ratio of0.733.This demonstrates that multi-path routing can be used to recover from path failures and results in a better delivery ratio.DDR increases slightly as the network-density increases since higher network density slightly counteracts the effect of dead nodes.This algorithm increases the DDR and reduces energy consumption at the same time since packet multiplexing over duplicate paths helps in load balancing and prevents energy depletion.VII.C ONCLUSIONIn this paper,we demonstrated MuMHR,which is an im-provement over LEACH.MuMHR provides solutions to some of the limitations of LEACH.The number-of-hops parameter and the back-off waiting time resulted in more energy efficient cluster formation.The algorithm uses redundant messages received from different sources to build a multi-path map, which allows auto-adaptation to path failures.MuMHR also enable multi-hop transmissions to relax LEACH’s inflexible assumption that all nodes in the network can communicate with each other.The new algorithm achieves robustness and efficiency without location information and with less energy expenditure than LEACH.Simulation results confirm the effi-ciency of the algorithm in terms of communication reduction, robustness and energy savings.This routing algorithm was implemented and used by Shuttleworth et al.[17]and found to easily support various computationally demending applications for WSNs.A CKNOWLEDGMENTSThe authors would like to thank Sarah Mount for her help and support in using SenSorPlus.R EFERENCES[1]W.Heinzelman,“Application-specific protocol architectures for wirelessnetworks,”in PhD thesis,Massachusetts institute of technology,June 2000.[2]S.Lindsey,C.Raghavendra,and K.Sivalingam,“Data gathering insensor networks using the energy*delay metric,”in Proceedings of the IPDPS Workshop on Issues in Wireless Networks and Mobile Computing, April2001.[3] A.Manjeshwar and D.Agrawal,“A protocol for enhanced efficiencyin wireless sensor networks,”in Proceedings of the1st International Workshop on Parallel and Distributed Computing Issues in Wireless Networks and Mobile Computing,April2001.[4]——,“Apteen:A hybrid protocol for efficient routing and comprehen-sive information retrieval in wireless sensor networks,”in Proceedings of the2nd International Workshop on Parallel and Distributed Computing Issues in Wireless Networks and Mobile computing,April2002.[5]S.Lindsey and C.Raghavendra,“Pegasis:Power efficient gathering insensor information systems,”in Proceedings of the IEEE Aerospace Conference,March2002.[6]G.Smaragdakis,I.Matta,and A.Bestavros,“Sep:A stable electionprotocol for clustered heterogeneous wireless sensor networks,”in Second International Workshop on Sensor and Actor Network Protocols and Applications(SANPA2004),August2004.[7]M.Ye,C.Li,G.Chen,and J.Wu,“Eecs:An energy efficient clusteringscheme in wireless sensor networks,”in Performance,Computing,and Communications Conference,2005.IPCCC2005.24th IEEE Interna-tional,April2005,pp.535–540.[8]P.Kulkarni,D.Ganesan,and P.Shenoy,“The case for multi-tier camerasensor networks,”Proceedings of the13th annual ACM international conference on Multimedia,pp.229–238,2005.[9]W.Heinzelman,A.Chandrakasan,and H.Balakrishna,“Energy-efficientcommunication protocol for wireless microsensor networks,”Proceed-ings of the33rd International Conference on System Sciences,January 2000.[10]S.Lee and T.Chung,“Data aggregation for wireless sensor networksusing self-organizing map,”in Artificial Intelligence and Simulation,vol.3397/2005.Springer Berlin/Heidelberg,2004,pp.508–517. [11]M.Hammoudeh,“Robust and energy efficient routing in wireless sensornetworks,”Master’s thesis,University of Leicester,2006.[12]S.Mount,R.Newman,and E.Gaura,“A simulation tool for systemservices in ad-hoc wireless sensor networks,”NSTI Nanotechnology Conference and Trade Show,vol.3,p.423,May2005.[13],“Gumstix way small computing,”2007,[Online;accessed26-March-2007].[Online].Available:[14]L.Xia,X.Chen,and X.Guan,“A new gradient-based routing protocolin wireless sensor networks,”Springer-Verlag Berline Heidelberg,2005.[15]Y.Liu and W.Seah,“A priority-based multi-path routing protocol forsensor networks,”Personal,Indoor and Mobile Radio Communications, vol.1,pp.216–220,Sept.2004.[16]J.Dunn and C.Martin,“Terminology for frame relay benchmarking,”in Internet informational RFC3133,June2001.[17]J.Shuttleworth,M.Hammoudeh,E.Gaura,and R.Newman,“Experi-mental applications of mapping services in wireless sensor networks,”in Fourth International Conference on Networked Sensing Systems,June 2007.。