Consider the following undirected graph with 6 vertices (1–6…

Consider the following undirected graph with 6 vertices (1–6) and the edges listed in the order they are processed: {1, 2} {2, 3} {3, 4} {4, 5} {2, 5} {5, 6} Assuming a Disjoint Set structure with initial sets {{1}, {2}, {3}, {4}, {5}, {6}} is used for detecting cycles, answer the following 1. Which edge first creates a cycle? 2. After processing the first four edges ({1,2},{2,3},{3,4},{4,5}), what is the set containing vertex 1? 3. How many disjoint sets remain after a cycle is found using the disjoint set data structure? 4. How many union operations actually merge two different sets before detecting a cycle?

You are given a Graph represented as an adjacency list using…

You are given a Graph represented as an adjacency list using the following container: unordered map adj_list.  The vertex labels are integers and the key of the map stores vertices and the vector of integers store the neighbors of that vertex. Your goal is to write a function in C++ called sum_of_levels() that take in as input the following three parameters: this Graph represented as an adjacency list called graph; a source vertex called source; and  an integer called level, which refers to the distance from source node to it’s neighbor. level > 0 This function must return the sum of all the vertices within the specified level.   Example for Graph, G below;  Alt Text for this Graph’s Adjacency List representation: Vertex: Neighbors of Vertex (Edges pointing from a vertex to the neighbor)0: 1, 21: 32: 43: 54: -5: 4Input: Graph G, Source 0, level 1Output: 3 (Sum of 1 + 2) Input: Graph G, Source 0, level 2Output: 7 (Sum of 3 + 4)Input: Graph G, Source 0, level 3Output: 5 (Sum of 5)Input: Graph G, Source 4, level 1Output: 0 (No neighbors of 4 at a distance of 1)You can use the following compilers to test your code: 1. https://cpp.sh/2. https://my.newtonschool.co/playgrounds/cpp-compiler3. https://www.w3schools.com/cpp/trycpp.asp?filename=demo_compiler

Below is an image of a coffee cup calorimeter with 89.4 g or…

Below is an image of a coffee cup calorimeter with 89.4 g or water.  The temperature of water is measured before and after the addition of an 30.0 g of unknown metal.  How much energy is gained or lost by the water.  The specific heat of water is s = 4.184 .