Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Discrete mathematics.
Let G = (V, E) be a simple graph4 with n = |V| vertices, and let A be its adjacency matrix of dimension n × n. We want to count the L-cycles : such a cycle, denoted by C = u0u1 · · · uL with uL = u0 contains L distinct vertices u0, . . . , uL-1 et L edges E(C) = {uiui+1 | 0 ≤ i ≤ L − 1} ⊆ E. Two cycles are distinct if the edge sets are different : C = C' if and only if E(C) = E(C'). We define the matrices D, T, Q, the powers of A by matrix multiplication : D = A · A = A2, T = A · D = A3, Q = A · T = A4. Consider the values on the diagonals.
Prove that the number of 3-cycles N3 in the whole graph is N3 = 1/6 ∑ u∈V Tu,u
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- We are given an undirected connected graph G = (V, E) and vertices s and t.Initially, there is a robot at position s and we want to move this robot to position t by moving it along theedges of the graph; at any time step, we can move the robot to one of the neighboring vertices and the robotwill reach that vertex in the next time step.However, we have a problem: at every time step, a subset of vertices of this graph undergo maintenance andif the robot is on one of these vertices at this time step, it will be destroyed (!). Luckily, we are given theschedule of the maintenance for the next T time steps in an array M [1 : T ], where each M [i] is a linked-listof the vertices that undergo maintenance at time step i.Design an algorithm that finds a route for the robot to go from s to t in at most T seconds so that at notime i, the robot is on one of the maintained vertices, or output that this is not possible. The runtime ofyour algorithm should ideally be O((n + m) ·T ) but you will…arrow_forwardOne can manually count path lengths in a graph using adjacency matrices. Using the simple example below, produces the following adjacency matrix: A B A 1 1 B 1 0 This matrix means that given two vertices A and B in the graph above, there is a connection from A back to itself, and a two-way connection from A to B. To count the number of paths of length one, or direct connections in the graph, all one must do is count the number of 1s in the graph, three in this case, represented in letter notation as AA, AB, and BA. AA means that the connection starts and ends at A, AB means it starts at A and ends at B, and so on. However, counting the number of two-hop paths is a little more involved. The possibilities are AAA, ABA, and BAB, AAB, and BAA, making a total of five 2-hop paths. The 3-hop paths starting from A would be AAAA, AAAB, AABA, ABAA, and ABAB. Starting from B, the 3-hop paths are BAAA, BAAB, and BABA. Altogether, that would be eight 3-hop paths within this graph. Write a program…arrow_forwardConsider eight points on the Cartesian two-dimensional xx-yy plane. For each pair of vertices uu and vv, the weight of edge uvuv is the Euclidean (Pythagorean) distance between those two points. For example, dist(a,h) = \sqrt{4^2 + 1^2} = \sqrt{17}dist(a,h)=42+12=17 and dist(a,b) = \sqrt{2^2 + 0^2} = 2dist(a,b)=22+02=2. Using the algorithm of your choice, determine one possible minimum-weight spanning tree and compute its total distance, rounding your answer to one decimal place. Clearly show your steps.arrow_forward
- Consider a graph where vertices represent intersections and edges represent roads. The company Food To Go can place a maximum of one food cart at each intersection. A food cart placed at intersection X has an income equal to the number of roads at intersection X (ie, the degree of vertex X). If two food carts share a road, the income of that road is shared equally among the two. We are interested in calculating the total profit of all food carts placed, ie, the total income minus the cost, where each food cart costs 1 unit and each road provides an income of 1 unit. More formally, the profit for a graph G = (V, E) where the set SC V represents food cart locations, is calculated by the number of edges covered by the vertices in S minus the size of S (ie. |S). A D C E B In this example, placing a food cart on each of the vertices A and C will result in a profit of ISCA P (A D(CD) (CFU VACU-5arrow_forwardDraw a graph G containing the following vertices and edges. V(G) = {0, 1, 2, 3, 4, 5, 6} E(G) = { (0, 1), (0, 2), (0, 3), (2, 1), (2, 4), (5, 1), (5, 3)}arrow_forwardConsider eight points on the Cartesian two-dimensional x-y plane. a g C For each pair of vertices u and v, the weight of edge uv is the Euclidean (Pythagorean) distance between those two points. For example, dist(a, h) : V4? + 1? = /17 and dist(a, b) = v2? + 0² = 2. Because many pairs of points have identical distances (e.g. dist(h, c) V5), the above diagram has more than one minimum-weight spanning tree. dist(h, b) = dist(h, f) Determine the total number of minimum-weight spanning trees that exist in the above diagram. Clearly justify your answer.arrow_forward
- Create a graph containing the following edges and display the nodes of a graph in depth first traversal and breadth first traversal. V(G) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} E(G) = {(0, 1), (0, 5), (1, 2), (1, 3), (1, 5), (2, 4), (4, 3), (5, 6), (6, 8), (7, 3), (7, 8), (8, 10), (9, 4), (9, 7), (9, 10)} The input file should consist of the number of vertices in the graph in the first line and the vertices that are adjacent to the vertex in the following lines. Header File #ifndef H_graph #define H_graph #include <iostream> #include <fstream> #include <iomanip> #include "linkedList.h" #include "unorderedLinkedList.h" #include "linkedQueue.h" using namespace std; class graphType { public: bool isEmpty() const; void createGraph(); void clearGraph(); void printGraph() const; void depthFirstTraversal(); void dftAtVertex(int vertex); void breadthFirstTraversal(); graphType(int size = 0); ~graphType(); protected: int maxSize; //maximum number of…arrow_forward3. 4. Given a directed acyclic graph G = (V, E) and two vertices s, te V, design an efficient algorithm that computes the number of different directed paths from s to t. Define the incidence matrix B of a directed graph with no self-loop to be an nxm matrix with rows indexed by vertices, column indexed by edges such that Bij = -1 1 0 if edge j leaves vertex i, if edge jenters vertex i, otherwise. Let BT be the transpose of matrix B. Find out what the entries of the n x n matrix BBT stand for.arrow_forwardGiven N cities represented as vertices V₁, V2, un on an undirected graph (i.e., each edge can be traversed in both directions). The graph is fully-connected where the edge eij connecting any two vertices vį and vj is the straight-line distance between these two cities. We want to search for the shortest path from v₁ (the source) to VN (the destination). ... Assume that all edges have different values, and €₁,7 has the largest value among the edges. That is, the source and destination have the largest straight-line distance. Compare the lists of explored vertices when we run the uniform-cost search and the A* search for this problem. Hint: The straight-line distance is the shortest path between any two cities. If you do not know how to start, try to run the algorithms by hand on some small cases first; but remember to make sure your graphs satisfy the conditions in the question.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education