Proving a formula for # of edges

  • Thread starter Mr Davis 97
  • Start date
  • Tags
    Formula
In summary: They would just want to see that you understand the concept and can apply it correctly. So your explanation is sufficient and concise.
  • #1
Mr Davis 97
1,462
44

Homework Statement


If ##v## is an integer greater than or equal to ##2##, then ##P_v## is the graph having vertex set ##\{1,2,3, \dots, v \}## and edge set ##\{\{1,2 \}, \{2,3 \}, \{3,4 \}, \dots, \{v-1,v \} \}##. Prove that this graph has ##v-1## edges.

Homework Equations

The Attempt at a Solution


Induction:
With ##P_2##, we have ##\{1,2\}## and ##\{ \{1,2\} \}##, so there is ##2-1 = 1## edge.
Suppose that ##P_k## has ##k-1## edges. Then ##P_{k+1}## has ##k## edges because its edge set is ##\{\{1,2 \}, \{2,3 \}, \{3,4 \}, \dots, \{k-1,k \}, \{k,k+1\} \}##.I feel like I'm doing something wrong, but I'm not sure. Is this induction right? Is there a way to do it without induction?
 
Physics news on Phys.org
  • #2
Mr Davis 97 said:

Homework Statement


If ##v## is an integer greater than or equal to ##2##, then ##P_v## is the graph having vertex set ##\{1,2,3, \dots, v \}## and edge set ##\{\{1,2 \}, \{2,3 \}, \{3,4 \}, \dots, \{v-1,v \} \}##. Prove that this graph has ##v-1## edges.

Homework Equations

The Attempt at a Solution


Induction:
With ##P_2##, we have ##\{1,2\}## and ##\{ \{1,2\} \}##, so there is ##2-1 = 1## edge.
Suppose that ##P_k## has ##k-1## edges. Then ##P_{k+1}## has ##k## edges because its edge set is ##\{\{1,2 \}, \{2,3 \}, \{3,4 \}, \dots, \{k-1,k \}, \{k,k+1\} \}##.I feel like I'm doing something wrong, but I'm not sure. Is this induction right? Is there a way to do it without induction?

It's fairly straightforward to see that the edge sets contains v-1 elements no? Doesn't this solve the question? I haven't done graph theory lately so I might be missing something.
 
  • #3
Math_QED said:
It's fairly straightforward to see that the edge sets contains v-1 elements no? Doesn't this solve the question? I haven't done graph theory lately so I might be missing something.
It's straightforward to see, but don't I still need to prove it? I guess my main question then is since it is so self-evident, what would constitute a proof? Could I say, the cardinality of the edge set is clearly v-1?
 
  • #4
Mr Davis 97 said:
It's straightforward to see, but don't I still need to prove it? I guess my main question then is since it is so self-evident, what would constitute a proof?

If you really want to, you can set up a natural bijection between the edge set ##\{\{i,i+1\}\mid i \in \{1, \dots, v-1\}\}## and ##\{1, \dots v-1\}##. But this seems overkill.

The statement is so obvious to me that I wouldn't even bother to give a proof.
 
  • Like
Likes Mr Davis 97
  • #5
I don't get it. Haven't you already numbered all edges by the notation of the set? All edges are of the form ##\{\,i,i+1\,\}##. So if you formally define the numbering ##n : \{\,\{\,i,i+1\,\}\, : \,1\le i \le v-1\,\} \longrightarrow \{\,1,\ldots,v-1\,\}## by ##n(i) =min\{\,i,i+1\,\}## which is a bijection and ##\operatorname{im}n = \{\,1,\ldots,v-1\,\}## you have the result. But as @Math_QED already said: a bit of an overkill.
 
  • #6
What about this: If ##v## is an integer greater than or equal to ##4##, ##W_v## is the graph having vertex set ##\{1,2,3, \dots, v \}## and edge set ##\{ \{1,2\}, \{1,3\}, \dots, \{1,v\}, \{2,3\}, \{3,4\}, \dots, \{v-1,v\}, \{v,2\} \}##. Prove this graph has ##2(v-1)## edges. How would I go about proving this? It seems a little less obvious...
 
  • #7
Mr Davis 97 said:
What about this: If ##v## is an integer greater than or equal to ##4##, ##W_v## is the graph having vertex set ##\{1,2,3, \dots, v \}## and edge set ##\{ \{1,2\}, \{1,3\}, \dots, \{1,v\}, \{2,3\}, \{3,4\}, \dots, \{v-1,v\}, \{v,2\} \}##. Prove this graph has ##2(v-1)## edges. How would I go about proving this? It seems a little less obvious...
Formally also with a numbering. In this example it's only more work to do it, such that it's a bijection.
 
  • Like
Likes Mr Davis 97
  • #8
fresh_42 said:
Formally also with a numbering. In this example it's only more work to do it, such that it's a bijection.
Could a sufficient proof be that, looking at the edge set, we have ##(v-1)+(v-2) +1 = 2(v-1)## elements?
 
  • #9
Mr Davis 97 said:
Could a sufficient proof be that, looking at the edge set, we have ##(v-1)+(v-2) +1 = 2(v-1)## elements?

Yes, that's perfectly fine. I doubt an instructor would ever ask to set up a bijection when it is obvious as in this case.
 
  • Like
Likes Mr Davis 97

Related to Proving a formula for # of edges

1. What is a formula for finding the number of edges in a graph?

The formula for finding the number of edges in a graph is E = (V*(V-1))/2, where E represents the number of edges and V represents the number of vertices.

2. How does this formula work?

This formula is based on the fact that in a graph, each vertex is connected to every other vertex except itself. Therefore, for each vertex, there are V-1 possible edges that can be connected to it. Since there are V vertices in total, we multiply V-1 by V to get the total number of possible edges. However, this counts each edge twice, so we divide by 2 to get the final formula.

3. Can this formula be used for any type of graph?

Yes, this formula can be used for any type of graph, including directed and undirected graphs. It applies to both simple and multigraphs, as well as graphs with loops.

4. How can I prove that this formula is accurate?

To prove this formula, you can use mathematical induction. First, show that it works for a graph with 1 vertex. Then, assume it works for a graph with n vertices and use this to prove that it also works for a graph with n+1 vertices. This will confirm that the formula holds for all graphs.

5. Are there any other ways to calculate the number of edges in a graph?

Yes, there are other methods such as counting the number of edges manually or using matrix operations. However, the formula for finding the number of edges is the most efficient and accurate method for large graphs.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
537
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
899
  • Calculus and Beyond Homework Help
Replies
5
Views
3K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
Back
Top