3.5.3 · HinglishGraphs

Incidence matrix

1,513 words7 min readRead in English

3.5.3 · Coding › Graphs


Incidence matrix KYA hota hai?


Ise scratch se KAISE banayein (construction se derivation)

Hum koi formula yaad nahi karte — hum matrix ko generate karte hain.

  1. Har vertex list karo → ye rows ko label karenge.
  2. Har edge ko us vertex pair ke roop mein list karo jise wo join karta hai → ye columns ko label karenge.
  3. Har column (edge) ke liye, uske do endpoints ki rows mein mark lagao.
Figure — Incidence matrix

Worked Example 1 — Undirected

Graph: vertices , edges (ek triangle).

1 0 1
1 1 0
0 1 1
  • Row 1 = 1 0 1 KYU? Vertex 1 sirf edges aur mein hai. → Ye step KYU? Hum har edge scan karte hain aur poochte hain "kya vertex 1 ek endpoint hai?"
  • Degrees check karein: har row ka sum 2 hai → har vertex ki degree 2 hai. Triangle ke liye sahi. ✔

Worked Example 2 — Directed

Edges: , , .

0
0
0
  • KYU? Edge vertex 1 ko leave karti hai (vertex 1 tail hai). → Ye step KYU? Convention: tail negative, head positive.
  • Check: har column ka sum 0 hai. ✔

Worked Example 3 — Self-loop

Edge vertex 1 par ek loop hai (ek edge ).

2
  • 2 KYU (undirected mein) 1 ki jagah? Ek loop vertex 1 ko dono endpoints se touch karta hai, isliye ye degree mein 2 add karta hai. → Ye step KYU? Row-sum = degree rule consistent rehta hai (loops degree mein 2 add karte hain).




Recall Feynman: ek 12-saal ke bacche ko samjhao

Ek dosto ki list socho. Side mein sabke naam likho. Upar har dosti likho jaise "Dosti #1". Agar wo insaan us dosti ka hissa hai toh box mein tick lagao. Kyunki ek dosti hamesha do logon ko jorti hai, isliye har column mein exactly do ticks aate hain. Apni row ke ticks gino aur tumhe pata chalega tumhare kitne dost hain. Wo tick-grid hi incidence matrix hai — dosto ko pure numbers mein likhne ka tarika taaki computer unhe padh sake.


Flashcards

n vertices aur m edges wale graph ke incidence matrix ki dimensions kya hoti hain?
(rows = vertices, columns = edges).
Ek undirected incidence matrix mein har column mein kitne non-zero entries hote hain?
Exactly do (do endpoints), ya self-loop ke liye sirf ek "2".
Row ka sum (undirected) kiske barabar hota hai?
Vertex ki degree ke.
Ek directed incidence matrix mein edge ke tail aur head ko kaunsi values se mark karte hain?
Tail = , Head = .
Directed incidence matrix mein har column ka sum 0 KYU hota hai?
Har edge mein ek tail () aur ek head () hota hai; wo cancel ho jaate hain.
Ek self-loop ek undirected incidence matrix mein kaise dikhta hai?
Us vertex ki row mein ki ek entry ke roop mein (loop degree mein 2 add karta hai).
Incidence matrix Handshake Lemma ko kaise prove karta hai?
Columns se total 1's gino = ; rows se gino = ; isliye .
Directed incidence matrix B ke terms mein graph Laplacian kya hai?
.

Connections

  • Adjacency matrix — alternative representation (vertex-to-vertex).
  • Graph Laplacian — oriented incidence matrix se ke roop mein banta hai.
  • Degree of a vertex — yahan ek row sum ke barabar hota hai.
  • Handshake Lemma — incidence marks count karne se nikalta hai.
  • Sparse graph representations — bade graphs ke liye incidence lists/CSR.

Concept Map

encoded as

dimensions

rows

columns

undirected rule

directed rule

row sum gives

each column has

column sum

leads to

contrast with

Graph vertices and edges

Incidence matrix B

n x m size

Vertices

Edges

1 if endpoint else 0

-1 tail +1 head

Degree of vertex

Exactly two 1s

Sum equals 0

Graph Laplacian L equals BB transpose

Adjacency matrix n x n