in Graph Theory retagged by
26,704 views
100 votes
100 votes
Consider an undirected graph $G$ where self-loops are not allowed. The vertex set of $G$ is $\{(i,j) \mid1 \leq i \leq 12, 1 \leq j \leq 12\}$. There is an edge between $(a,b)$ and $(c,d)$ if $|a-c| \leq 1$ and $|b-d| \leq 1$. The number of edges in this graph is______.
in Graph Theory retagged by
26.7k views

4 Comments

@ very nice diagrammatic representation. Thank you...

0
0

nice explaination

0
0

Answer is 506. 

A clear explanation of the solution is in this image. I hope everything will be cleared. I tried to show every detail of every edge.

 

 

7
7

10 Answers

0 votes
0 votes

There are already some great answers here, just adding my 2 cents on finding the recurrence relation for this question. Let $E_n$ denote number of edges in the given graph with $n$ vertices. Then given a graph with $k-1$ vertices, we can add edges systematically to it to make it a graph with $k$ vertices as follows:

  1. Add $2k-3$ “crosses” (one cross next to each of the $k-2$ crosses already present and one at the corner giving us $2(k-2) + 1=2k-3$)
  2. Add $2(k-1)$ horizontal edges
  3. Add $2(k-1)$ vertical edges

This gives us the recurrence relation : $E_n = E_{n-1} + \underbrace{2(2k-3)}_{\text{crosses}} + \underbrace{2(k-1)}_{\text{horizontal edges}} + \underbrace{2(k-1)}_{\text{vertical edges}}$

 

Below is the visualization when going from graph with 2 vertices to graph with 3 vertices :

graphviz

Notice that in the base case, $E_2=6$

0 votes
0 votes

SO total- 506

Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true