The document describes a distributed algorithm for finding minimum-weight spanning trees (MSTs) in a graph. Each node starts as its own fragment and tries to find the lowest-weight outgoing edge to connect to another fragment. Fragments combine based on their levels, with lower-level fragments joining higher-level ones. The algorithm relies on properties of MSTs, where joining the lowest outgoing edge of a fragment yields another MST fragment. Nodes communicate by passing messages to discover edges and decide which fragments to combine.
This document discusses graph operations and representations. It provides examples of graph problems including path finding, connectedness problems, and spanning tree problems. It also discusses different representations of graphs like adjacency matrices and adjacency lists. It notes that 12 Java classes would be needed to fully represent directed/undirected weighted/unweighted graphs using adjacency matrices, linked lists, and array-based adjacency lists. It provides an example of an abstract Graph class that can be extended to implement different graph representations and types.
This document discusses algorithms for finding minimum spanning trees and shortest paths in graphs. It covers Prim's algorithm and Kruskal's algorithm for finding minimum spanning trees, and Dijkstra's algorithm for finding single-source shortest paths in graphs with non-negative edge weights. Examples are provided to illustrate how each algorithm works on sample graphs by progressively building up the minimum spanning tree or shortest path tree. Resources for further learning about data structures and algorithms are also listed.
Dijkstra's algorithm is used to find the shortest path from a starting node to all other nodes in a network. It works by assigning initial distance values to all nodes from the starting node and then iteratively updating the distances by considering connections to neighboring nodes. At each step, it selects the node with the smallest distance value and designates it as permanent until all nodes have been reached.
The document discusses graph representations and algorithms. It describes two common graph representations: adjacency matrix and adjacency list. It then explains traversal algorithms like breadth-first search and depth-first search. Spanning trees and minimum spanning trees are discussed along with Prim's and Kruskal's algorithms. Finally, it covers the single source shortest path problem and Dijkstra's algorithm for solving it on weighted graphs.
This document describes algorithms for finding a minimum-cost spanning tree in a weighted, undirected graph. It discusses Kruskal's and Prim's algorithms, which work by greedily adding edges to a growing forest/tree in a way that avoids cycles. Kruskal's runs in O(E log E) time by using a min heap to select edges and union-find to detect cycles during edge additions. Prim's grows a single-component tree by repeatedly adding minimum cost edges connecting new vertices in O(E log V) time.
The document discusses greedy algorithms and their applications. It provides examples of problems that greedy algorithms can solve optimally, such as the change making problem and finding minimum spanning trees (MSTs). It also discusses problems where greedy algorithms provide approximations rather than optimal solutions, such as the traveling salesman problem. The document describes Prim's and Kruskal's algorithms for finding MSTs and Dijkstra's algorithm for solving single-source shortest path problems. It explains how these algorithms make locally optimal choices at each step in a greedy manner to build up global solutions.
Depth-first search (DFS) and breadth-first search (BFS) are algorithms for traversing or searching trees and graphs. DFS uses a stack and recursively explores as far as possible along each branch before backtracking, while BFS uses a queue and explores neighboring nodes first before moving to the next level. A minimum spanning tree (MST) is a subgraph that connects all vertices with minimum total edge weight. Common algorithms to find an MST are Kruskal's algorithm, which adds edges in order of weight, and Prim's algorithm, which grows the tree from an initial vertex.
Suffix trees and suffix arrays are data structures used to solve problems related to string matching and text indexing in an efficient manner. Suffix trees allow finding patterns in text in O(m) time where m is the pattern length, by traversing the tree. Suffix arrays store suffixes in sorted order and allow pattern searching in O(m+logn) time where n is text length. Both structures take O(n) time and space to construct where n is text length. They find applications in bioinformatics, data compression, and other string algorithms.
This document discusses graph operations and representations. It provides examples of graph problems including path finding, connectedness problems, and spanning tree problems. It also discusses different representations of graphs like adjacency matrices and adjacency lists. It notes that 12 Java classes would be needed to fully represent directed/undirected weighted/unweighted graphs using adjacency matrices, linked lists, and array-based adjacency lists. It provides an example of an abstract Graph class that can be extended to implement different graph representations and types.
This document discusses algorithms for finding minimum spanning trees and shortest paths in graphs. It covers Prim's algorithm and Kruskal's algorithm for finding minimum spanning trees, and Dijkstra's algorithm for finding single-source shortest paths in graphs with non-negative edge weights. Examples are provided to illustrate how each algorithm works on sample graphs by progressively building up the minimum spanning tree or shortest path tree. Resources for further learning about data structures and algorithms are also listed.
Dijkstra's algorithm is used to find the shortest path from a starting node to all other nodes in a network. It works by assigning initial distance values to all nodes from the starting node and then iteratively updating the distances by considering connections to neighboring nodes. At each step, it selects the node with the smallest distance value and designates it as permanent until all nodes have been reached.
The document discusses graph representations and algorithms. It describes two common graph representations: adjacency matrix and adjacency list. It then explains traversal algorithms like breadth-first search and depth-first search. Spanning trees and minimum spanning trees are discussed along with Prim's and Kruskal's algorithms. Finally, it covers the single source shortest path problem and Dijkstra's algorithm for solving it on weighted graphs.
This document describes algorithms for finding a minimum-cost spanning tree in a weighted, undirected graph. It discusses Kruskal's and Prim's algorithms, which work by greedily adding edges to a growing forest/tree in a way that avoids cycles. Kruskal's runs in O(E log E) time by using a min heap to select edges and union-find to detect cycles during edge additions. Prim's grows a single-component tree by repeatedly adding minimum cost edges connecting new vertices in O(E log V) time.
The document discusses greedy algorithms and their applications. It provides examples of problems that greedy algorithms can solve optimally, such as the change making problem and finding minimum spanning trees (MSTs). It also discusses problems where greedy algorithms provide approximations rather than optimal solutions, such as the traveling salesman problem. The document describes Prim's and Kruskal's algorithms for finding MSTs and Dijkstra's algorithm for solving single-source shortest path problems. It explains how these algorithms make locally optimal choices at each step in a greedy manner to build up global solutions.
Depth-first search (DFS) and breadth-first search (BFS) are algorithms for traversing or searching trees and graphs. DFS uses a stack and recursively explores as far as possible along each branch before backtracking, while BFS uses a queue and explores neighboring nodes first before moving to the next level. A minimum spanning tree (MST) is a subgraph that connects all vertices with minimum total edge weight. Common algorithms to find an MST are Kruskal's algorithm, which adds edges in order of weight, and Prim's algorithm, which grows the tree from an initial vertex.
Suffix trees and suffix arrays are data structures used to solve problems related to string matching and text indexing in an efficient manner. Suffix trees allow finding patterns in text in O(m) time where m is the pattern length, by traversing the tree. Suffix arrays store suffixes in sorted order and allow pattern searching in O(m+logn) time where n is text length. Both structures take O(n) time and space to construct where n is text length. They find applications in bioinformatics, data compression, and other string algorithms.
This document summarizes several graph algorithms, including:
1) Prim's algorithm for finding minimum spanning trees, which grows a minimum spanning tree by successively adding the closest vertex;
2) Dijkstra's algorithm for single-source shortest paths, which is similar to Prim's and finds shortest paths from a source vertex to all others;
3) An algorithm for all-pairs shortest paths based on repeated squaring of the weighted adjacency matrix, with multiplication replaced by minimization.
This document outlines divide and conquer algorithms for linear space sequence alignment. It discusses MergeSort as an example divide and conquer algorithm, and describes using a divide and conquer approach to solve the longest common subsequence (LCS) problem. It explains how to find the "middle vertex" between the source and sink for the LCS problem by dividing the problem space in half at each step. The document also covers using block alignment and the Four Russians speedup technique to solve sequence alignment problems in sub-quadratic time.
The document discusses sorting algorithms. It defines sorting as arranging a list of records in a certain order based on their keys. Some key points made:
- Sorting is important as it enables efficient searching and other tasks. Common sorting algorithms include selection sort, insertion sort, mergesort, quicksort, and heapsort.
- The complexity of sorting in general is Θ(n log n) but some special cases allow linear time sorting. Internal sorting happens in memory while external sorting handles data too large for memory.
- Applications of sorting include searching, finding closest pairs of numbers, checking for duplicates, and calculating frequency distributions. Sorting also enables efficient algorithms for computing medians, convex hulls, and
The document describes generating and analyzing a scale-free network using the Barabási-Albert (BA) preferential attachment model and Fruchterman-Reingold (FR) force-directed graph drawing algorithm. Key points:
- The BA model is used to generate an undirected scale-free network with 500 nodes and approximately 688 edges based on the given mean degree of 2.75.
- Degree distribution and circular layout are analyzed for the initial BA network. Giant components are then removed, increasing the average degree to 3.19.
- The FR algorithm is applied to visualize the network, treating nodes as electrons and edges as springs. Darker colors represent higher-degree nodes.
This document discusses recurrent neural networks (RNNs) and some of their applications and design patterns. RNNs are able to process sequential data like text or time series due to their ability to maintain an internal state that captures information about what has been observed in the past. The key challenges with training RNNs are vanishing and exploding gradients, which various techniques like LSTMs and GRUs aim to address. RNNs have been successfully applied to tasks involving sequential input and/or output like machine translation, image captioning, and language modeling. Memory networks extend RNNs with an external memory component that can be explicitly written to and retrieved from.
This document discusses graphs and graph algorithms. It defines graphs as consisting of nodes and edges. It describes two common representations of graphs: adjacency matrices and adjacency lists. It then explains several graph algorithms, including breadth-first search, depth-first search, minimum spanning tree algorithms like Prim's and Kruskal's, and shortest path algorithms like Dijkstra's and Floyd-Warshall.
The document discusses different types of tree traversals including preorder, inorder, postorder, and level order traversal. It provides examples of how to traverse a binary tree using each method and describes their visiting order. Additionally, it discusses applications of trees like binary search trees, expression trees, Huffman coding trees, and using trees to represent sets and perform union/find operations. The Huffman algorithm for data compression is explained in detail with an example.
The document discusses minimum spanning trees (MSTs) and algorithms for finding them. It defines an MST as a subgraph of an undirected weighted graph that spans all nodes, is connected, acyclic, and has the minimum total edge weight among all spanning trees. The document explains Prim's and Kruskal's algorithms for finding MSTs and provides examples of how they work on sample graphs. It also discusses properties of MSTs such as that multiple MSTs may exist for a given graph.
The document outlines an algorithm for calculating the number of tight contact structures on a solid torus. It first generates lists of possible arcs (connections between vertices) and then uses a tightness checker to analyze the arcs and determine if they allow a single closed curve or multiple curves. If a single curve is possible, the structure is potentially tight, while multiple curves mean it is overtwisted. The algorithm outputs the results of this checking for different numbers of vertices. It also briefly discusses checking for bypass curves between three arcs.
This document discusses several graph algorithms:
- Minimum spanning tree algorithms like Prim's and parallel formulations.
- Single-source and all-pairs shortest path algorithms like Dijkstra's and Floyd-Warshall. Parallel formulations are described.
- Other graph algorithms like connected components, transitive closure. Parallel formulations using techniques like merging forests are summarized.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Tensor Spectral Clustering is an algorithm that generalizes graph partitioning and spectral clustering methods to account for higher-order network structures. It defines a new objective function called motif conductance that measures how partitions cut motifs like triangles in addition to edges. The algorithm represents a tensor of higher-order random walk transitions as a matrix and computes eigenvectors to find a partition that minimizes the number of motifs cut, allowing networks to be clustered based on higher-order connectivity patterns. Experiments on synthetic and real networks show it can discover meaningful partitions by accounting for motifs that capture important structural relationships.
A review of two alignment-free methods for sequence comparison. In this presentation two alignment-free methods are studied:
- "Similarity analysis of DNA sequences based on LZ complexity and dynamic programming algorithm" by Guo et al.
- "Alignment-free comparison of genome sequences by a new numerical characterization" by Huang et al.
Lecture 7: Hierarchical clustering, DBSCAN, Mixture models and the EM algorithm (ppt,pdf)
Chapter 8,9 from the book “Introduction to Data Mining” by Tan, Steinbach, Kumar.
- The document describes a PVEB tree that can be used to efficiently find the minimum, maximum, predecessor, and successor of elements in a dynamic array.
- The tree reduces the time complexity of these operations from O(n) in a normal array to O(log(log(n))) in the PVEB tree through its hierarchical clustering structure.
- However, insert, delete, and membership query operations have slightly higher time complexity of O(1) in a normal array compared to the PVEB tree.
A tree kernel based approach for clone detectionICSM 2010
This document proposes a tree kernel-based approach for clone detection that is able to detect type 3 code clones. It defines features to annotate nodes in abstract syntax trees, including instruction class, instruction, context, and lexemes. A kernel function is used to measure similarity between pairs of nodes based on their features. The technique then applies this node comparison recursively to compute similarity between entire subtrees and identify clones. An evaluation on artificially injected clones in a small Java system found the approach could detect all type 1 and 2 clones with no false positives, and achieved best results for type 3 clones with a similarity threshold of 0.7.
A Tree Kernel based approach for clone detectionValerio Maggio
"A Tree Kernel based approach for clone detection"
Slides presented at the International Conference of Software Maintenance (ICSM) 2010 - TImsoara, Romania
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
This document summarizes several graph algorithms, including:
1) Prim's algorithm for finding minimum spanning trees, which grows a minimum spanning tree by successively adding the closest vertex;
2) Dijkstra's algorithm for single-source shortest paths, which is similar to Prim's and finds shortest paths from a source vertex to all others;
3) An algorithm for all-pairs shortest paths based on repeated squaring of the weighted adjacency matrix, with multiplication replaced by minimization.
This document outlines divide and conquer algorithms for linear space sequence alignment. It discusses MergeSort as an example divide and conquer algorithm, and describes using a divide and conquer approach to solve the longest common subsequence (LCS) problem. It explains how to find the "middle vertex" between the source and sink for the LCS problem by dividing the problem space in half at each step. The document also covers using block alignment and the Four Russians speedup technique to solve sequence alignment problems in sub-quadratic time.
The document discusses sorting algorithms. It defines sorting as arranging a list of records in a certain order based on their keys. Some key points made:
- Sorting is important as it enables efficient searching and other tasks. Common sorting algorithms include selection sort, insertion sort, mergesort, quicksort, and heapsort.
- The complexity of sorting in general is Θ(n log n) but some special cases allow linear time sorting. Internal sorting happens in memory while external sorting handles data too large for memory.
- Applications of sorting include searching, finding closest pairs of numbers, checking for duplicates, and calculating frequency distributions. Sorting also enables efficient algorithms for computing medians, convex hulls, and
The document describes generating and analyzing a scale-free network using the Barabási-Albert (BA) preferential attachment model and Fruchterman-Reingold (FR) force-directed graph drawing algorithm. Key points:
- The BA model is used to generate an undirected scale-free network with 500 nodes and approximately 688 edges based on the given mean degree of 2.75.
- Degree distribution and circular layout are analyzed for the initial BA network. Giant components are then removed, increasing the average degree to 3.19.
- The FR algorithm is applied to visualize the network, treating nodes as electrons and edges as springs. Darker colors represent higher-degree nodes.
This document discusses recurrent neural networks (RNNs) and some of their applications and design patterns. RNNs are able to process sequential data like text or time series due to their ability to maintain an internal state that captures information about what has been observed in the past. The key challenges with training RNNs are vanishing and exploding gradients, which various techniques like LSTMs and GRUs aim to address. RNNs have been successfully applied to tasks involving sequential input and/or output like machine translation, image captioning, and language modeling. Memory networks extend RNNs with an external memory component that can be explicitly written to and retrieved from.
This document discusses graphs and graph algorithms. It defines graphs as consisting of nodes and edges. It describes two common representations of graphs: adjacency matrices and adjacency lists. It then explains several graph algorithms, including breadth-first search, depth-first search, minimum spanning tree algorithms like Prim's and Kruskal's, and shortest path algorithms like Dijkstra's and Floyd-Warshall.
The document discusses different types of tree traversals including preorder, inorder, postorder, and level order traversal. It provides examples of how to traverse a binary tree using each method and describes their visiting order. Additionally, it discusses applications of trees like binary search trees, expression trees, Huffman coding trees, and using trees to represent sets and perform union/find operations. The Huffman algorithm for data compression is explained in detail with an example.
The document discusses minimum spanning trees (MSTs) and algorithms for finding them. It defines an MST as a subgraph of an undirected weighted graph that spans all nodes, is connected, acyclic, and has the minimum total edge weight among all spanning trees. The document explains Prim's and Kruskal's algorithms for finding MSTs and provides examples of how they work on sample graphs. It also discusses properties of MSTs such as that multiple MSTs may exist for a given graph.
The document outlines an algorithm for calculating the number of tight contact structures on a solid torus. It first generates lists of possible arcs (connections between vertices) and then uses a tightness checker to analyze the arcs and determine if they allow a single closed curve or multiple curves. If a single curve is possible, the structure is potentially tight, while multiple curves mean it is overtwisted. The algorithm outputs the results of this checking for different numbers of vertices. It also briefly discusses checking for bypass curves between three arcs.
This document discusses several graph algorithms:
- Minimum spanning tree algorithms like Prim's and parallel formulations.
- Single-source and all-pairs shortest path algorithms like Dijkstra's and Floyd-Warshall. Parallel formulations are described.
- Other graph algorithms like connected components, transitive closure. Parallel formulations using techniques like merging forests are summarized.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Tensor Spectral Clustering is an algorithm that generalizes graph partitioning and spectral clustering methods to account for higher-order network structures. It defines a new objective function called motif conductance that measures how partitions cut motifs like triangles in addition to edges. The algorithm represents a tensor of higher-order random walk transitions as a matrix and computes eigenvectors to find a partition that minimizes the number of motifs cut, allowing networks to be clustered based on higher-order connectivity patterns. Experiments on synthetic and real networks show it can discover meaningful partitions by accounting for motifs that capture important structural relationships.
A review of two alignment-free methods for sequence comparison. In this presentation two alignment-free methods are studied:
- "Similarity analysis of DNA sequences based on LZ complexity and dynamic programming algorithm" by Guo et al.
- "Alignment-free comparison of genome sequences by a new numerical characterization" by Huang et al.
Lecture 7: Hierarchical clustering, DBSCAN, Mixture models and the EM algorithm (ppt,pdf)
Chapter 8,9 from the book “Introduction to Data Mining” by Tan, Steinbach, Kumar.
- The document describes a PVEB tree that can be used to efficiently find the minimum, maximum, predecessor, and successor of elements in a dynamic array.
- The tree reduces the time complexity of these operations from O(n) in a normal array to O(log(log(n))) in the PVEB tree through its hierarchical clustering structure.
- However, insert, delete, and membership query operations have slightly higher time complexity of O(1) in a normal array compared to the PVEB tree.
A tree kernel based approach for clone detectionICSM 2010
This document proposes a tree kernel-based approach for clone detection that is able to detect type 3 code clones. It defines features to annotate nodes in abstract syntax trees, including instruction class, instruction, context, and lexemes. A kernel function is used to measure similarity between pairs of nodes based on their features. The technique then applies this node comparison recursively to compute similarity between entire subtrees and identify clones. An evaluation on artificially injected clones in a small Java system found the approach could detect all type 1 and 2 clones with no false positives, and achieved best results for type 3 clones with a similarity threshold of 0.7.
A Tree Kernel based approach for clone detectionValerio Maggio
"A Tree Kernel based approach for clone detection"
Slides presented at the International Conference of Software Maintenance (ICSM) 2010 - TImsoara, Romania
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Generative AI Use cases applications solutions and implementation.pdfmahaffeycheryld
Generative AI solutions encompass a range of capabilities from content creation to complex problem-solving across industries. Implementing generative AI involves identifying specific business needs, developing tailored AI models using techniques like GANs and VAEs, and integrating these models into existing workflows. Data quality and continuous model refinement are crucial for effective implementation. Businesses must also consider ethical implications and ensure transparency in AI decision-making. Generative AI's implementation aims to enhance efficiency, creativity, and innovation by leveraging autonomous generation and sophisticated learning algorithms to meet diverse business challenges.
https://www.leewayhertz.com/generative-ai-use-cases-and-applications/
Supermarket Management System Project Report.pdfKamal Acharya
Supermarket management is a stand-alone J2EE using Eclipse Juno program.
This project contains all the necessary required information about maintaining
the supermarket billing system.
The core idea of this project to minimize the paper work and centralize the
data. Here all the communication is taken in secure manner. That is, in this
application the information will be stored in client itself. For further security the
data base is stored in the back-end oracle and so no intruders can access it.
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...PriyankaKilaniya
Energy efficiency has been important since the latter part of the last century. The main object of this survey is to determine the energy efficiency knowledge among consumers. Two separate districts in Bangladesh are selected to conduct the survey on households and showrooms about the energy and seller also. The survey uses the data to find some regression equations from which it is easy to predict energy efficiency knowledge. The data is analyzed and calculated based on five important criteria. The initial target was to find some factors that help predict a person's energy efficiency knowledge. From the survey, it is found that the energy efficiency awareness among the people of our country is very low. Relationships between household energy use behaviors are estimated using a unique dataset of about 40 households and 20 showrooms in Bangladesh's Chapainawabganj and Bagerhat districts. Knowledge of energy consumption and energy efficiency technology options is found to be associated with household use of energy conservation practices. Household characteristics also influence household energy use behavior. Younger household cohorts are more likely to adopt energy-efficient technologies and energy conservation practices and place primary importance on energy saving for environmental reasons. Education also influences attitudes toward energy conservation in Bangladesh. Low-education households indicate they primarily save electricity for the environment while high-education households indicate they are motivated by environmental concerns.
Height and depth gauge linear metrology.pdfq30122000
Height gauges may also be used to measure the height of an object by using the underside of the scriber as the datum. The datum may be permanently fixed or the height gauge may have provision to adjust the scale, this is done by sliding the scale vertically along the body of the height gauge by turning a fine feed screw at the top of the gauge; then with the scriber set to the same level as the base, the scale can be matched to it. This adjustment allows different scribers or probes to be used, as well as adjusting for any errors in a damaged or resharpened probe.
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
Open Channel Flow: fluid flow with a free surfaceIndrajeet sahu
Open Channel Flow: This topic focuses on fluid flow with a free surface, such as in rivers, canals, and drainage ditches. Key concepts include the classification of flow types (steady vs. unsteady, uniform vs. non-uniform), hydraulic radius, flow resistance, Manning's equation, critical flow conditions, and energy and momentum principles. It also covers flow measurement techniques, gradually varied flow analysis, and the design of open channels. Understanding these principles is vital for effective water resource management and engineering applications.
1. A Distributed Algorithm for
Minimum-Weight Spanning
Trees
by
R. G. Gallager, P.A. Humblet, and P. M. Spira
ACM, Transactions on Programming Language and systems,1983
4. Introduction
• Problem
( , )
G V E
A graph
Every edge has a weight , ( )
e E w e
4
8
3
1
7
2
5
6
5. • Solution
( , )
T V E
A spanning tree
So that the sum is minimized
( )
e E
w e
Introduction
4
8
3
1
7
2
5
6
6. 5
• Solution
( , )
T V E
A spanning tree
So that the sum is minimized
( )
e E
w e
Introduction
4
8
3
1
7
2 6
7. • Definition – MST fragment
A connected sub-tree of MST
Introduction
5
4
8
3
1
7
2 6
Example of possible fragments:
8. • MST Property 1
Given a fragment of an MST, let e be a minimum-weight
outgoing edge of the fragment. Then joining e and its adjacent
non-fragment node to the fragment yields another fragment of
an MST.
Introduction
5
4
8
3
1
7
2 6
e
9. • MST Property 1
Given a fragment of an MST, let e be a minimum-weight
outgoing edge of the fragment. Then joining e and its adjacent
non-fragment node to the fragment yields another fragment of
an MST.
Introduction
5
4
8
3
1
7
2 6
e
• Proof:
10. • MST Property 1
Given a fragment of an MST, let e be a minimum-weight
outgoing edge of the fragment. Then joining e and its adjacent
non-fragment node to the fragment yields another fragment of
an MST.
Introduction
5
4
8
3
1
7
2 6
• Proof:
Suppose e is not in MST, but some e’
instead.
e’
e
11. e
• MST Property 1
Given a fragment of an MST, let e be a minimum-weight
outgoing edge of the fragment. Then joining e and its adjacent
non-fragment node to the fragment yields another fragment of
an MST.
Introduction
5
4
8
3
1
7
2 6
• Proof:
Suppose e is not in MST, but some e’
instead.
e’
MST with e forms a cycle.
12. e
• MST Property 1
Given a fragment of an MST, let e be a minimum-weight
outgoing edge of the fragment. Then joining e and its adjacent
non-fragment node to the fragment yields another fragment of
an MST.
Introduction
5
4
8
3
1
7
2 6
• Proof:
Suppose e is not in MST, but some e’
instead.
e’
MST with e forms a cycle.
We obtain a cheaper MST with e
instead of e’.
13. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
14. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
• Proof:
15. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
Suppose existence of two MSTs.
• Proof:
T T’
16. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
Suppose existence of two MSTs.
• Proof:
T T’
Let e be the minimal-weight edge
not in both MSTs (wlog e in T).
e
17. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
Suppose existence of two MSTs.
• Proof:
T T’
Let e be the minimal-weight edge
not in both MSTs (wlog e in T).
T’with e has a cycle
e
18. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
Suppose existence of two MSTs.
• Proof:
T T’
Let e be the minimal-weight edge
not in both MSTs (wlog e in T).
T’with e has a cycle
e
e’
At least cycle edge e’is not in T.
19. • MST Property 2
If all the edges of a connected graph have different
weights, then the MST is unique.
Introduction
4
8
3
1
7
2
5
6
4
8
3
1
7
2
5
6
Suppose existence of two MSTs.
• Proof:
T T’
Let e be the minimal-weight edge
not in both MSTs (wlog e in T).
T’with e has a cycle
At least cycle edge e’is not in T.
e
e’
Since w(e) < w(e’) we conclude
that T’with e and without e’is a
smaller MST than T’.
20. • Idea of MST based on properties 1 & 2
Start with fragments of one node.
4
8
3
1
7
2
5
6
Introduction
21. • Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
4
8
3
1
7
2
5
6
Combine fragments with a common node
(property 2)
Introduction
22. • Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
4
8
3
1
7
2
5
6
Combine fragments with a common node
(property 2)
Introduction
23. • Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
4
8
3
1
7
2
5
6
Combine fragments with a common node
(property 2)
Introduction
24. 4
8
3
1
7
2
5
6
• Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
Combine fragments with a common node
(property 2)
Introduction
25. 4
8
3
1
7
2
5
6
• Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
Combine fragments with a common node
(property 2)
Introduction
26. 4
8
3
1
7
2
5
6
• Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
Combine fragments with a common node
(property 2)
Introduction
27. 4
8
3
1
7
2
5
6
• Idea of MST based on properties 1 & 2
Enlarge fragments in any order (property 1)
Combine fragments with a common node
(property 2)
Introduction
31. 4
8
3
1
7
2
5
6
The idea of Distributed MST
• Fragments
Each fragment finds its minimum outgoing edge.
Then it tries to combine with the adjacent fragment.
32. The idea of Distributed MST
• Levels
Every fragment has an associated level that
has impact on combining fragments.
A fragment with a single node is defined to
to be at level 0.
33. The idea of Distributed MST
• Levels
The combination of two fragments depends on
the levels of fragments.
4
8
3
1
7
2
5
6
F
F’
34. The idea of Distributed MST
• Levels
The combination of two fragments depends on
the levels of fragments.
4
8
3
1
7
2
5
6
L=1
L’=2
F
F’
If a fragment F wishes to
connect to a fragment F’
and L < L’then:
35. The idea of Distributed MST
• Levels
The combination of two fragments depends on
the levels of fragments.
4
8
3
1
7
2
5
6
L=1
L’=2
F
F’
If a fragment F wishes to
connect to a fragment F’
and L < L’then:
F is absorbed in F’and the
resulting fragment is at level
L’.
36. The idea of Distributed MST
• Levels
The combination of two fragments depends on
the levels of fragments.
4
8
3
1
7
2
5
6
L=1
L’=1
F
F’
If fragments F and F’have
the same minimum outgoing
edge and L = L’then:
37. The idea of Distributed MST
• Levels
The combination of two fragments depends on
the levels of fragments.
4
8
3
1
7
2
5
6
L=1
L’=1
F
F’
If fragments F and F’have
the same minimum outgoing
edge and L = L’then:
The fragments combine into
a new fragment F’’at level
L’’= L+1.
L’’=2
F’’
38. The idea of Distributed MST
• Levels
The identity of a fragment is the weight of its
4
8
3
1
7
2
5
6
If fragments F and F’with
same level were combined,
the combining edge is called
the core of the new segment.
L’’=2
F’’
core.
core
39. The idea of Distributed MST
• State
Each node has a state
Sleeping - initial state
Find - during fragment’s search for a minimal
outgoing edge
Found - otherwise (when a minimal outgoing
edge was found
42. 4
8
3
1
7
2
5
6
The Algorithm
• Fragment minimum outgoing edge discovery
When a node awakes from
the state Sleeping, it finds a
minimum edge connected.
Special case of zero-level fragment (Sleeping).
43. The Algorithm
• Minimum outgoing edge discovery
Marks it as a branch of
MST and sends a Connect
message over this edge.
4
8
3
1
7
2
5
6
When a node awakes from
the state Sleeping, it finds a
minimum edge connected.
Special case of zero-level fragment (Sleeping).
44. The Algorithm
• Minimum outgoing edge discovery
Marks it as a branch of
MST and sends a Connect
message over this edge.
Goes into a Found state.
4
8
3
1
7
2
5
6
When a node awakes from a
state Sleeping, it finds a
minimum edge connected.
Special case of zero-level fragment (Sleeping).
45. The Algorithm
• Minimum outgoing edge discovery
Take a fragment at level L that was just combined
out of two level L-1 fragments.
L=1
L’=1
F
F’
L’’=2
F’’
4
3
1
7
2
5
6
8
46. The Algorithm
• Minimum outgoing edge discovery
The weight of the core is the
identity of the fragment.
Take a fragment at level L that was just combined
out of two level L-1 fragments.
core
L=1
L’=1
F
F’
L’’=2
F’’
4
3
1
7
2
5
6
8
ID’’ = 2
It acts as a root of a
fragment tree.
47. The Algorithm
• Minimum outgoing edge discovery
Nodes adjacent to core send
an Initiate message to the
borders.
Take a fragment at level L that was just combined
out of two level L-1 fragments.
4
3
1
7
2
5
6
8
48. The Algorithm
• Minimum outgoing edge discovery
Nodes adjacent to core send
an Initiate message to the
borders.
Take a fragment at level L that was just combined
out of two level L-1 fragments.
Relayed by the intermediate
nodes in the fragment.
4
3
1
7
2
5
6
8
49. The Algorithm
• Minimum outgoing edge discovery
Nodes adjacent to core send
an Initiate message to the
borders.
Take a fragment at level L that was just combined
out of two level L-1 fragments.
Relayed by the intermediate
nodes in the fragment.
4
3
1
7
2
5
6
8
Puts the nodes in the Find
state.
50. The Algorithm
• Minimum outgoing edge discovery
Basic - yet to be classified, can
be inside fragment or outgoing
edges
Edge classification/
4
3
1
7
2
5
6
8
51. The Algorithm
• Minimum outgoing edge discovery
Rejected – an inside fragment
edge
Edge classification.
4
3
1
7
2
5
6
8
53. The Algorithm
• Minimum outgoing edge discovery
Sends a Test message on
Basic edges (minimal first)
On receiving the Initiate message a node tries
to find a minimum outgoing edge.
4
3
1
7
2
5
6
8
54. The Algorithm
• Minimum outgoing edge discovery
In case of same identity:
On receiving the Test message.
4
3
1
7
2
5
6
8
send a Reject message, the
edge is Rejected.
In case Test was sent in
both directions, the edge is
Rejected automatically
without a Reject message.
55. The Algorithm
• Minimum outgoing edge discovery
In case of a self lower level:
On receiving the Test message.
4
3
1
7
2
5
6
8
Delay the response until the
identity rises sufficiently.
L=0
L=3
Response
Delayed
56. The Algorithm
• Minimum outgoing edge discovery
In case of a self higher level:
On receiving the Test message.
4
3
1
7
2
5
6
8
Send an Accept message
L=0
L=3
The edge is accepted as a
candidate.
57. The Algorithm
• Minimum outgoing edge discovery
Nodes send Report messages
along the branches of the MST.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
If no outgoing edge was
found the algorithm is
complete.
58. The Algorithm
• Minimum outgoing edge discovery
Nodes send Report messages
along the branches of the MST.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
If no outgoing edge was
found the algorithm is
complete.
After sending they go into
Found mode.
59. The Algorithm
• Minimum outgoing edge discovery
Every leaf sends the Report
when resolved its outgoing edge.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
60. The Algorithm
• Minimum outgoing edge discovery
Every leaf sends the Report
when resolved its outgoing edge.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
61. The Algorithm
• Minimum outgoing edge discovery
Every interior sends the Report
when resolved its outgoing and
all its children sent theirs.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
62. The Algorithm
• Minimum outgoing edge discovery
Every interior sends the Report
when resolved its outgoing and
all its children sent theirs.
Agreeing on the minimal outgoing edge.
4
3
1
7
2
5
6
8
63. The Algorithm
• Minimum outgoing edge discovery
4
3
1
7
2
5
6
8
Agreeing on the minimal outgoing edge.
Every node remembers the
branch to the minimal outgoing
edge of its sub-tree, denoted
best-edge.
minimal
outgoing
best-edge
64. The Algorithm
• Minimum outgoing edge discovery
4
3
1
7
2
5
6
8
Agreeing on the minimal outgoing edge.
The core adjacent nodes
exchange Reports and decide on
the minimal outgoing edge.
?
65. The Algorithm
• Combining segments
4
3
1
7
2
5
6
8
Changing core.
When decided a Change-core
message is sent over branches to
the minimal outgoing edge.
?
new core
The tree branches point to the
new core.
66. The Algorithm
4
3
1
7
2
5
6
8
?
Connect
The tree branches point to the
new core.
When decided a Change-core
message is sent over branches to
the minimal outgoing edge.
Finally a Connect message is
sent over the minimal edge.
• Combining segments
Changing core
67. The Algorithm
• Final notes
Connecting same level fragments.
4
8
3
1
7
2
5
6
L=1
L’=1
F
F’
68. The Algorithm
Both core adjacent nodes send a
Connect message, which causes
the level to be increased.
• Final notes
Connecting same level fragments.
4
8
3
1
7
2
5
6
L=1
L’=1
F
F’
As a result, core is changed and
new Initiate messages are sent.
69. The Algorithm
When lower level fragment F’at node n’joins
some fragment F at node n before n sent its
Report.
• Final notes
Connecting lower level fragments.
We can send n’an Initiate message with the Find
state so it joins the search.
70. The Algorithm
When lower level fragment F’at node n’joins
some fragment F at node n after n sent its
Report.
• Final notes
Connecting lower level fragments.
It means that n already found a lower edge and
therefore we can send n’an Initiate message with
the Found state so it doesn’t join the search.
71. The Algorithm
When forwarding an Initiate message to the
leafs, it is also forwarded to any pending
fragments at level L-1, as they might be delayed
with response.
• Final notes
Forwarding the Initiate message at level L.
72. The Algorithm
Level L+1 contains at least 2 fragments at level
L.
• Final notes
Upper bound on fragment levels.
Level L contains at least nodes.
2L
is an upper bound on fragment levels.
2
log N
73. The Algorithm
The Connect message is sent on the minimal
outgoing edge only.
• Proof outline
Correct MST build-up
As a result of properties 1 & 2 we should obtain
an MST.
74. The Algorithm
Assume there is a deadlock.
• Proof outline
No deadlocks
Choose a fragment from the lowest level set
and with minimal outgoing edge in that set.
Its Test/Connect message surely will be replied.
There will always be a working fragment.
75. The Algorithm
• Complexity
Communication
At most E Reject messages (with corresponding E
Test messages, because each edge can be rejected
only once.
76. At every but the zero or last levels, each node can
accept up to 1 Initiate, Accept messages. It can
transmit up to 1 Test (successful), Report,
ChangeRoot, Connect. Since the number of levels
is bounded by number of such messages is
at most .
The Algorithm
• Complexity
Communication
2
log N
2
5 (log 1)
N N
77. At level zero, each node receives at most one
Initiate and transmits at most one Connect. At the
last level a node can send at most one Report
message, as a result at most 3N such messages.
The Algorithm
• Complexity
Communication
78. As a result, the upper bound is: .
The Algorithm
• Complexity
Communication
2
5 log 2
N N E
79. We prove by induction that one needs 5lN - 3N
time units for every node to reach level l.
The Algorithm
• Complexity
Time (under assumption of initial awakening it
is )
2
5 log
N N
80. l=1 Each node is awakened and sends a
Connect message. By time 2N all nodes should be
at level 1.
The Algorithm
• Complexity
Time (under assumption of initial awakening it
is )
2
5 log
N N
81. Assume l At level l, each node can send at most N Test
messages which will be answered before time 51N - N . The
propagation of the Report messages, ChangeRoot, Connect,
and Initiate messages can take at most 3N units, so that by
time 5 ( l + 1)N - 3N all nodes are at level l + 1.
The Algorithm
• Complexity
Time (under assumption of initial awakening it
is )
2
5 log
N N
82. At the highest level only Test, Reject, and Report
messages are used.
The Algorithm
• Complexity
Time (under assumption of initial awakening it
is )
2
5 log
N N
83. As a result we have the algorithm complete
under time units.
The Algorithm
• Complexity
2
5 log
N N
Time (under assumption of initial awakening it
is )
2
5 log
N N